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