Lines Matching refs:shm

180 	struct tee_shm *shm;
183 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params),
185 if (IS_ERR(shm))
186 return shm;
188 ma = tee_shm_get_va(shm, 0);
194 rc = tee_shm_get_pa(shm, 0, msg_parg);
203 tee_shm_free(shm);
207 return shm;
216 struct tee_shm *shm;
223 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg);
224 if (IS_ERR(shm))
225 return PTR_ERR(shm);
283 tee_shm_free(shm);
291 struct tee_shm *shm;
306 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
307 if (IS_ERR(shm))
308 return PTR_ERR(shm);
314 tee_shm_free(shm);
322 struct tee_shm *shm;
335 shm = get_msg_arg(ctx, arg->num_params, &msg_arg, &msg_parg);
336 if (IS_ERR(shm))
337 return PTR_ERR(shm);
360 tee_shm_free(shm);
367 struct tee_shm *shm;
379 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
380 if (IS_ERR(shm))
381 return PTR_ERR(shm);
388 tee_shm_free(shm);
437 break; /* All shm's freed */
439 struct tee_shm *shm;
448 shm = reg_pair_to_ptr(res.result.shm_upper32,
450 tee_shm_free(shm);
611 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
639 tee_shm_get_page_offset(shm));
644 msg_arg->params->u.tmem.shm_ref = (unsigned long)shm;
645 msg_arg->params->u.tmem.size = tee_shm_get_size(shm);
651 (tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
663 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
677 msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm;
686 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
697 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm)