Lines Matching refs:shm

130 	struct tee_shm *shm;  in tee_ioctl_shm_alloc()  local
139 shm = tee_shm_alloc(ctx, data.size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); in tee_ioctl_shm_alloc()
140 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
141 return PTR_ERR(shm); in tee_ioctl_shm_alloc()
143 data.id = shm->id; in tee_ioctl_shm_alloc()
144 data.flags = shm->flags; in tee_ioctl_shm_alloc()
145 data.size = shm->size; in tee_ioctl_shm_alloc()
150 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc()
157 tee_shm_put(shm); in tee_ioctl_shm_alloc()
167 struct tee_shm *shm; in tee_ioctl_shm_register() local
176 shm = tee_shm_register(ctx, data.addr, data.length, in tee_ioctl_shm_register()
178 if (IS_ERR(shm)) in tee_ioctl_shm_register()
179 return PTR_ERR(shm); in tee_ioctl_shm_register()
181 data.id = shm->id; in tee_ioctl_shm_register()
182 data.flags = shm->flags; in tee_ioctl_shm_register()
183 data.length = shm->size; in tee_ioctl_shm_register()
188 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_register()
194 tee_shm_put(shm); in tee_ioctl_shm_register()
205 struct tee_shm *shm; in params_from_user() local
237 shm = tee_shm_get_from_id(ctx, ip.c); in params_from_user()
238 if (IS_ERR(shm)) in params_from_user()
239 return PTR_ERR(shm); in params_from_user()
247 (ip.a + ip.b) > shm->size) { in params_from_user()
248 tee_shm_put(shm); in params_from_user()
254 params[n].u.memref.shm = shm; in params_from_user()
356 params[n].u.memref.shm) in tee_ioctl_open_session()
357 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_open_session()
418 params[n].u.memref.shm) in tee_ioctl_invoke()
419 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_invoke()
477 if (!p->u.memref.shm) { in params_to_supp()
483 ip.c = p->u.memref.shm->id; in params_to_supp()
584 p->u.memref.shm = NULL; in params_from_supp()