mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-09 14:43:28 +09:00
BACKPORT: tee: shm: add page accessor functions
In order to register a shared buffer in TEE, we need accessor
function that return list of pages for that buffer.
Change-Id: I4078da3e7fff7e44bb6478e297250458d66dd89d
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit e0c69ae8bf)
Signed-off-by: Victor Chong <victor.chong@linaro.org>
This commit is contained in:
committed by
Amit Pundir
parent
875096695d
commit
345ccf320e
@@ -403,6 +403,19 @@ static inline size_t tee_shm_get_size(struct tee_shm *shm)
|
||||
return shm->size;
|
||||
}
|
||||
|
||||
/**
|
||||
* tee_shm_get_pages() - Get list of pages that hold shared buffer
|
||||
* @shm: Shared memory handle
|
||||
* @num_pages: Number of pages will be stored there
|
||||
* @returns pointer to pages array
|
||||
*/
|
||||
static inline struct page **tee_shm_get_pages(struct tee_shm *shm,
|
||||
size_t *num_pages)
|
||||
{
|
||||
*num_pages = shm->num_pages;
|
||||
return shm->pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* tee_shm_get_page_offset() - Get shared buffer offset from page start
|
||||
* @shm: Shared memory handle
|
||||
|
||||
Reference in New Issue
Block a user