Lines Matching refs:shm
135 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
144 shm = tee_shm_alloc(ctx, data.size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); in tee_ioctl_shm_alloc()
145 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
146 return PTR_ERR(shm); in tee_ioctl_shm_alloc()
148 data.id = shm->id; in tee_ioctl_shm_alloc()
149 data.flags = shm->flags; in tee_ioctl_shm_alloc()
150 data.size = shm->size; in tee_ioctl_shm_alloc()
155 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc()
162 tee_shm_put(shm); in tee_ioctl_shm_alloc()
172 struct tee_shm *shm; in tee_ioctl_shm_register() local
181 shm = tee_shm_register(ctx, data.addr, data.length, in tee_ioctl_shm_register()
183 if (IS_ERR(shm)) in tee_ioctl_shm_register()
184 return PTR_ERR(shm); in tee_ioctl_shm_register()
186 data.id = shm->id; in tee_ioctl_shm_register()
187 data.flags = shm->flags; in tee_ioctl_shm_register()
188 data.length = shm->size; in tee_ioctl_shm_register()
193 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_register()
199 tee_shm_put(shm); in tee_ioctl_shm_register()
210 struct tee_shm *shm; in params_from_user() local
242 shm = tee_shm_get_from_id(ctx, ip.c); in params_from_user()
243 if (IS_ERR(shm)) in params_from_user()
244 return PTR_ERR(shm); in params_from_user()
252 (ip.a + ip.b) > shm->size) { in params_from_user()
253 tee_shm_put(shm); in params_from_user()
259 params[n].u.memref.shm = shm; in params_from_user()
361 params[n].u.memref.shm) in tee_ioctl_open_session()
362 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_open_session()
423 params[n].u.memref.shm) in tee_ioctl_invoke()
424 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_invoke()
482 if (!p->u.memref.shm) { in params_to_supp()
488 ip.c = p->u.memref.shm->id; in params_to_supp()
589 p->u.memref.shm = NULL; in params_from_supp()