From 0ad321f8d56493b8e86f2e13df58d338b2d740d2 Mon Sep 17 00:00:00 2001 From: Jens Wiklander Date: Thu, 26 Oct 2023 10:18:07 +0200 Subject: [PATCH] core: arm: rpc_alloc: remove size limit for kernel payload Removes the size limit of 1 page imposed in thread_rpc_alloc_kernel_payload(). The purpose of this limit was to error out early since the kernel doesn't supply a list of physical pages and the source of the error is not obvious at first glance. This is now about to change so remove the limit since the kernel now may supply the needed list of physical pages. Signed-off-by: Jens Wiklander Reviewed-by: Jerome Forissier Reviewed-by: Etienne Carriere --- core/arch/arm/kernel/thread_optee_smc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/arch/arm/kernel/thread_optee_smc.c b/core/arch/arm/kernel/thread_optee_smc.c index 24087741727..c1fcc23b36c 100644 --- a/core/arch/arm/kernel/thread_optee_smc.c +++ b/core/arch/arm/kernel/thread_optee_smc.c @@ -681,14 +681,6 @@ struct mobj *thread_rpc_alloc_payload(size_t size) struct mobj *thread_rpc_alloc_kernel_payload(size_t size) { - /* - * Error out early since kernel private dynamic shared memory - * allocations don't currently use the `OPTEE_MSG_ATTR_NONCONTIG` bit - * and therefore cannot be larger than a page. - */ - if (IS_ENABLED(CFG_CORE_DYN_SHM) && size > SMALL_PAGE_SIZE) - return NULL; - return thread_rpc_alloc(size, 8, OPTEE_RPC_SHM_TYPE_KERNEL); }