diff options
author | Balint Dobszay <balint.dobszay@arm.com> | 2024-03-25 18:11:02 +0300 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2024-04-03 14:58:20 +0300 |
commit | cf4441503e20a0c0a36e0a98dcf57de3d3844c91 (patch) | |
tree | 4152ef166cc65f39009968dd963e50ef7c780628 /include | |
parent | 0439fcff304acdedfc493dbf900dce86922fd31f (diff) | |
download | linux-cf4441503e20a0c0a36e0a98dcf57de3d3844c91.tar.xz |
tee: optee: Move pool_op helper functions
Move the pool alloc and free helper functions from the OP-TEE driver to
the TEE subsystem, since these could be reused in other TEE drivers.
This patch is not supposed to change behavior, it's only reorganizing
the code.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tee_core.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/tee_core.h b/include/linux/tee_core.h index d9b3ba8e8fa9..efd16ed52315 100644 --- a/include/linux/tee_core.h +++ b/include/linux/tee_core.h @@ -232,6 +232,16 @@ void *tee_get_drvdata(struct tee_device *teedev); */ struct tee_shm *tee_shm_alloc_priv_buf(struct tee_context *ctx, size_t size); +int tee_dyn_shm_alloc_helper(struct tee_shm *shm, size_t size, size_t align, + int (*shm_register)(struct tee_context *ctx, + struct tee_shm *shm, + struct page **pages, + size_t num_pages, + unsigned long start)); +void tee_dyn_shm_free_helper(struct tee_shm *shm, + int (*shm_unregister)(struct tee_context *ctx, + struct tee_shm *shm)); + /** * tee_shm_is_dynamic() - Check if shared memory object is of the dynamic kind * @shm: Shared memory handle |