Lines Matching refs:shm
50 struct tee_shm *shm; in optee_from_msg_param() local
78 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
80 if (!shm) { in optee_from_msg_param()
82 p->u.memref.shm = NULL; in optee_from_msg_param()
85 rc = tee_shm_get_pa(shm, 0, &pa); in optee_from_msg_param()
89 p->u.memref.shm = shm; in optee_from_msg_param()
96 rc = tee_shm_get_pa(shm, o, NULL); in optee_from_msg_param()
107 shm = (struct tee_shm *)(unsigned long) in optee_from_msg_param()
110 if (!shm) { in optee_from_msg_param()
112 p->u.memref.shm = NULL; in optee_from_msg_param()
116 p->u.memref.shm = shm; in optee_from_msg_param()
136 mp->u.tmem.shm_ref = (unsigned long)p->u.memref.shm; in to_msg_param_tmp_mem()
139 if (!p->u.memref.shm) { in to_msg_param_tmp_mem()
144 rc = tee_shm_get_pa(p->u.memref.shm, p->u.memref.shm_offs, &pa); in to_msg_param_tmp_mem()
161 mp->u.rmem.shm_ref = (unsigned long)p->u.memref.shm; in to_msg_param_reg_mem()
201 if (tee_shm_is_registered(p->u.memref.shm)) in optee_to_msg_param()
267 struct tee_shm *shm; in optee_release() local
276 shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg), TEE_SHM_MAPPED); in optee_release()
277 if (!IS_ERR(shm)) { in optee_release()
278 arg = tee_shm_get_va(shm, 0); in optee_release()
286 if (tee_shm_va2pa(shm, arg, &parg)) in optee_release()
303 if (!IS_ERR(shm)) in optee_release()
304 tee_shm_free(shm); in optee_release()