tee: replace tee_shm_alloc()
authorJens Wiklander <jens.wiklander@linaro.org>
Wed, 9 Jun 2021 06:30:11 +0000 (08:30 +0200)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 4 Feb 2022 09:09:06 +0000 (10:09 +0100)
commit0ac105330c0b1f4ec9d66cd1c3ac0af4abe288c0
tree78257d4fb256dd39104261c7129c244408cbc232
parentfa6f85e7232d13bc22e20e06f67ac3621be20e79
tee: replace tee_shm_alloc()

tee_shm_alloc() is replaced by three new functions,

tee_shm_alloc_user_buf() - for user mode allocations, replacing passing
the flags TEE_SHM_MAPPED | TEE_SHM_DMA_BUF

tee_shm_alloc_kernel_buf() - for kernel mode allocations, slightly
optimized compared to using the flags TEE_SHM_MAPPED | TEE_SHM_DMA_BUF.

tee_shm_alloc_priv_buf() - primarily for TEE driver internal use.

This also makes the interface easier to use as we can get rid of the
somewhat hard to use flags parameter.

The TEE subsystem and the TEE drivers are updated to use the new
functions instead.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/call.c
drivers/tee/optee/device.c
drivers/tee/optee/ffa_abi.c
drivers/tee/optee/smc_abi.c
drivers/tee/tee_shm.c
include/linux/tee_drv.h