Lines Matching refs:shm

186 	struct tee_shm *shm;  in get_msg_arg()  local
189 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params), in get_msg_arg()
191 if (IS_ERR(shm)) in get_msg_arg()
192 return shm; in get_msg_arg()
194 ma = tee_shm_get_va(shm, 0); in get_msg_arg()
200 rc = tee_shm_get_pa(shm, 0, msg_parg); in get_msg_arg()
209 tee_shm_free(shm); in get_msg_arg()
213 return shm; in get_msg_arg()
222 struct tee_shm *shm; in optee_open_session() local
228 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session()
229 if (IS_ERR(shm)) in optee_open_session()
230 return PTR_ERR(shm); in optee_open_session()
283 tee_shm_free(shm); in optee_open_session()
291 struct tee_shm *shm; in optee_close_session() local
306 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg); in optee_close_session()
307 if (IS_ERR(shm)) in optee_close_session()
308 return PTR_ERR(shm); in optee_close_session()
314 tee_shm_free(shm); in optee_close_session()
322 struct tee_shm *shm; in optee_invoke_func() local
335 shm = get_msg_arg(ctx, arg->num_params, &msg_arg, &msg_parg); in optee_invoke_func()
336 if (IS_ERR(shm)) in optee_invoke_func()
337 return PTR_ERR(shm); in optee_invoke_func()
360 tee_shm_free(shm); in optee_invoke_func()
367 struct tee_shm *shm; in optee_cancel_req() local
379 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg); in optee_cancel_req()
380 if (IS_ERR(shm)) in optee_cancel_req()
381 return PTR_ERR(shm); in optee_cancel_req()
388 tee_shm_free(shm); in optee_cancel_req()
437 struct tee_shm *shm; in optee_disable_shm_cache() local
439 shm = reg_pair_to_ptr(res.result.shm_upper32, in optee_disable_shm_cache()
441 tee_shm_free(shm); in optee_disable_shm_cache()
573 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, in optee_shm_register() argument
601 tee_shm_get_page_offset(shm)); in optee_shm_register()
606 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
607 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
613 (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1)); in optee_shm_register()
625 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) in optee_shm_unregister() argument
639 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
648 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm, in optee_shm_register_supp() argument
659 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm) in optee_shm_unregister_supp() argument