Lines Matching refs:shm
41 struct tee_shm *shm; in optee_from_msg_param() local
69 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
71 if (!shm) { in optee_from_msg_param()
73 p->u.memref.shm = NULL; in optee_from_msg_param()
76 rc = tee_shm_get_pa(shm, 0, &pa); in optee_from_msg_param()
80 p->u.memref.shm = shm; in optee_from_msg_param()
87 rc = tee_shm_get_pa(shm, o, NULL); in optee_from_msg_param()
98 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
101 if (!shm) { in optee_from_msg_param()
103 p->u.memref.shm = NULL; in optee_from_msg_param()
107 p->u.memref.shm = shm; in optee_from_msg_param()
127 mp->u.tmem.shm_ref = (unsigned long)p->u.memref.shm; in to_msg_param_tmp_mem()
130 if (!p->u.memref.shm) { in to_msg_param_tmp_mem()
135 rc = tee_shm_get_pa(p->u.memref.shm, p->u.memref.shm_offs, &pa); in to_msg_param_tmp_mem()
152 mp->u.rmem.shm_ref = (unsigned long)p->u.memref.shm; in to_msg_param_reg_mem()
192 if (tee_shm_is_registered(p->u.memref.shm)) in optee_to_msg_param()
258 struct tee_shm *shm; in optee_release() local
267 shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg), TEE_SHM_MAPPED); in optee_release()
268 if (!IS_ERR(shm)) { in optee_release()
269 arg = tee_shm_get_va(shm, 0); in optee_release()
277 if (tee_shm_va2pa(shm, arg, &parg)) in optee_release()
294 if (!IS_ERR(shm)) in optee_release()
295 tee_shm_free(shm); in optee_release()