Lines Matching refs:shm
43 struct tee_shm *shm; in optee_from_msg_param() local
71 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
73 if (!shm) { in optee_from_msg_param()
75 p->u.memref.shm = NULL; in optee_from_msg_param()
78 rc = tee_shm_get_pa(shm, 0, &pa); in optee_from_msg_param()
82 p->u.memref.shm = shm; in optee_from_msg_param()
90 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
93 if (!shm) { in optee_from_msg_param()
95 p->u.memref.shm = NULL; in optee_from_msg_param()
99 p->u.memref.shm = shm; in optee_from_msg_param()
119 mp->u.tmem.shm_ref = (unsigned long)p->u.memref.shm; in to_msg_param_tmp_mem()
122 if (!p->u.memref.shm) { in to_msg_param_tmp_mem()
127 rc = tee_shm_get_pa(p->u.memref.shm, p->u.memref.shm_offs, &pa); in to_msg_param_tmp_mem()
144 mp->u.rmem.shm_ref = (unsigned long)p->u.memref.shm; in to_msg_param_reg_mem()
184 if (tee_shm_is_registered(p->u.memref.shm)) in optee_to_msg_param()
272 struct tee_shm *shm; in optee_release() local
281 shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg), in optee_release()
283 if (!IS_ERR(shm)) { in optee_release()
284 arg = tee_shm_get_va(shm, 0); in optee_release()
292 if (tee_shm_va2pa(shm, arg, &parg)) in optee_release()
309 if (!IS_ERR(shm)) in optee_release()
310 tee_shm_free(shm); in optee_release()