Lines Matching full:shm
167 struct tee_shm *shm = NULL; in tstee_invoke_func() local
194 shm = tee_shm_get_from_id(ctx, shm_id); in tstee_invoke_func()
195 if (IS_ERR(shm)) in tstee_invoke_func()
196 return PTR_ERR(shm); in tstee_invoke_func()
198 if (shm->size < req_len) { in tstee_invoke_func()
205 handle = shm->sec_world_id; in tstee_invoke_func()
232 if (shm && shm->size >= ffa_args[TS_RPC_SERVICE_RESP_LEN]) in tstee_invoke_func()
236 if (shm) in tstee_invoke_func()
237 tee_shm_put(shm); in tstee_invoke_func()
242 static int tstee_shm_register(struct tee_context *ctx, struct tee_shm *shm, in tstee_shm_register() argument
275 shm->sec_world_id = mem_args.g_handle; in tstee_shm_register()
281 lower_32_bits(shm->sec_world_id); in tstee_shm_register()
283 upper_32_bits(shm->sec_world_id); in tstee_shm_register()
290 (void)ffa_dev->ops->mem_ops->memory_reclaim(shm->sec_world_id, in tstee_shm_register()
300 ffa_dev->ops->mem_ops->memory_reclaim(shm->sec_world_id, 0); in tstee_shm_register()
307 static int tstee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) in tstee_shm_unregister() argument
319 lower_32_bits(shm->sec_world_id); in tstee_shm_unregister()
321 upper_32_bits(shm->sec_world_id); in tstee_shm_unregister()
335 rc = ffa_dev->ops->mem_ops->memory_reclaim(shm->sec_world_id, 0); in tstee_shm_unregister()
355 static int pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, in pool_op_alloc() argument
358 return tee_dyn_shm_alloc_helper(shm, size, align, tstee_shm_register); in pool_op_alloc()
361 static void pool_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) in pool_op_free() argument
363 tee_dyn_shm_free_helper(shm, tstee_shm_unregister); in pool_op_free()