aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tee/optee/ffa_abi.c
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2022-02-04 10:33:54 +0100
committerJens Wiklander <jens.wiklander@linaro.org>2022-02-16 07:49:41 +0100
commit5d41f1b3e3282909b6bbceacb9aebe1d3c849a49 (patch)
treeac0cfba8dc01820f55079584830fad7f44afca5d /drivers/tee/optee/ffa_abi.c
parenttee: simplify shm pool handling (diff)
downloadlinux-dev-5d41f1b3e3282909b6bbceacb9aebe1d3c849a49.tar.xz
linux-dev-5d41f1b3e3282909b6bbceacb9aebe1d3c849a49.zip
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>
Diffstat (limited to 'drivers/tee/optee/ffa_abi.c')
-rw-r--r--drivers/tee/optee/ffa_abi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 91dd80945bf1..fb7345941024 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -440,8 +440,8 @@ static void handle_ffa_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
shm = optee_rpc_cmd_alloc_suppl(ctx, arg->params[0].u.value.b);
break;
case OPTEE_RPC_SHM_TYPE_KERNEL:
- shm = tee_shm_alloc(optee->ctx, arg->params[0].u.value.b,
- TEE_SHM_MAPPED | TEE_SHM_PRIV);
+ shm = tee_shm_alloc_priv_buf(optee->ctx,
+ arg->params[0].u.value.b);
break;
default:
arg->ret = TEEC_ERROR_BAD_PARAMETERS;