Lines Matching refs:shm
180 struct tee_shm *shm; in get_msg_arg() local
183 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params), in get_msg_arg()
185 if (IS_ERR(shm)) in get_msg_arg()
186 return shm; in get_msg_arg()
188 ma = tee_shm_get_va(shm, 0); in get_msg_arg()
194 rc = tee_shm_get_pa(shm, 0, msg_parg); in get_msg_arg()
203 tee_shm_free(shm); in get_msg_arg()
207 return shm; in get_msg_arg()
216 struct tee_shm *shm; in optee_open_session() local
223 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg); in optee_open_session()
224 if (IS_ERR(shm)) in optee_open_session()
225 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()
439 struct tee_shm *shm; in __optee_disable_shm_cache() local
448 shm = reg_pair_to_ptr(res.result.shm_upper32, in __optee_disable_shm_cache()
450 tee_shm_free(shm); in __optee_disable_shm_cache()
611 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, in optee_shm_register() argument
639 tee_shm_get_page_offset(shm)); in optee_shm_register()
644 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm; in optee_shm_register()
645 msg_arg->params->u.tmem.size = tee_shm_get_size(shm); in optee_shm_register()
651 (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1)); in optee_shm_register()
663 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) in optee_shm_unregister() argument
677 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm; in optee_shm_unregister()
686 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm, in optee_shm_register_supp() argument
697 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm) in optee_shm_unregister_supp() argument