Lines Matching full:shm

183 	struct tee_shm *shm;  in get_msg_arg()  local
186 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params), in get_msg_arg()
188 if (IS_ERR(shm)) in get_msg_arg()
189 return shm; in get_msg_arg()
191 ma = tee_shm_get_va(shm, 0); in get_msg_arg()
197 rc = tee_shm_get_pa(shm, 0, msg_parg); in get_msg_arg()
206 tee_shm_free(shm); in get_msg_arg()
210 return shm; in get_msg_arg()
219 struct tee_shm *shm; in optee_open_session() local
226 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session()
227 if (IS_ERR(shm)) in optee_open_session()
228 return PTR_ERR(shm); in optee_open_session()
286 tee_shm_free(shm); in optee_open_session()
294 struct tee_shm *shm; in optee_close_session() local
309 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg); in optee_close_session()
310 if (IS_ERR(shm)) in optee_close_session()
311 return PTR_ERR(shm); in optee_close_session()
317 tee_shm_free(shm); in optee_close_session()
325 struct tee_shm *shm; in optee_invoke_func() local
338 shm = get_msg_arg(ctx, arg->num_params, &msg_arg, &msg_parg); in optee_invoke_func()
339 if (IS_ERR(shm)) in optee_invoke_func()
340 return PTR_ERR(shm); in optee_invoke_func()
363 tee_shm_free(shm); in optee_invoke_func()
370 struct tee_shm *shm; in optee_cancel_req() local
382 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg); in optee_cancel_req()
383 if (IS_ERR(shm)) in optee_cancel_req()
384 return PTR_ERR(shm); in optee_cancel_req()
391 tee_shm_free(shm); in optee_cancel_req()
440 break; /* All shm's freed */ in __optee_disable_shm_cache()
442 struct tee_shm *shm; in __optee_disable_shm_cache() local
451 shm = reg_pair_to_ptr(res.result.shm_upper32, in __optee_disable_shm_cache()
453 tee_shm_free(shm); in __optee_disable_shm_cache()
614 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, in optee_shm_register() argument
642 tee_shm_get_page_offset(shm)); in optee_shm_register()
647 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
648 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
654 (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1)); in optee_shm_register()
666 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) in optee_shm_unregister() argument
680 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
689 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm, in optee_shm_register_supp() argument
700 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm) in optee_shm_unregister_supp() argument