summaryrefslogtreecommitdiff
path: root/drivers/tee/optee/device.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-02-25 17:05:11 +0100
committerArnd Bergmann <arnd@arndb.de>2022-02-25 17:05:11 +0100
commit25b67f373b49e395ccffa840aa5ba1b81c2d2991 (patch)
tree1fc3a960efbcfa4e21ffd2b0dd78f1a08de78998 /drivers/tee/optee/device.c
parentbc5ede20b8ec15543f792703ced520c8adacedf4 (diff)
parenta45ea4efa358577c623d7353a6ba9af3c17f6ca0 (diff)
downloadlwn-25b67f373b49e395ccffa840aa5ba1b81c2d2991.tar.gz
lwn-25b67f373b49e395ccffa840aa5ba1b81c2d2991.zip
Merge tag 'tee-shm-for-v5.18' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers
TEE shared memory cleanup for v5.18 - The TEE shared memory pool based on two pools is replaced with a single somewhat more capable pool. - Replaces tee_shm_alloc() and tee_shm_register() with new functions easier to use and maintain. The TEE subsystem and the TEE drivers are updated to use the new functions instead. - The TEE based Trusted keys routines are updated to use the new simplified functions above. - The OP-TEE based rng driver is updated to use the new simplified functions above. - The TEE_SHM-flags are refactored to better match their usage * tag 'tee-shm-for-v5.18' of git://git.linaro.org:/people/jens.wiklander/linux-tee: tee: refactor TEE_SHM_* flags tee: replace tee_shm_register() KEYS: trusted: tee: use tee_shm_register_kernel_buf() tee: add tee_shm_register_{user,kernel}_buf() optee: add optee_pool_op_free_helper() tee: replace tee_shm_alloc() tee: simplify shm pool handling tee: add tee_shm_alloc_user_buf() tee: remove unused tee_shm_pool_alloc_res_mem() hwrng: optee-rng: use tee_shm_alloc_kernel_buf() optee: use driver internal tee_context for some rpc Link: https://lore.kernel.org/r/20220218184802.GA968155@jade Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/tee/optee/device.c')
-rw-r--r--drivers/tee/optee/device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c
index 128a2d2a50a1..f3947be13e2e 100644
--- a/drivers/tee/optee/device.c
+++ b/drivers/tee/optee/device.c
@@ -121,10 +121,9 @@ static int __optee_enumerate_devices(u32 func)
if (rc < 0 || !shm_size)
goto out_sess;
- device_shm = tee_shm_alloc(ctx, shm_size,
- TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
+ device_shm = tee_shm_alloc_kernel_buf(ctx, shm_size);
if (IS_ERR(device_shm)) {
- pr_err("tee_shm_alloc failed\n");
+ pr_err("tee_shm_alloc_kernel_buf failed\n");
rc = PTR_ERR(device_shm);
goto out_sess;
}