Lines Matching defs:shm
294 struct tee_shm *shm;
303 shm = tee_shm_alloc_user_buf(ctx, data.size);
304 if (IS_ERR(shm))
305 return PTR_ERR(shm);
307 data.id = shm->id;
308 data.size = shm->size;
313 ret = tee_shm_get_fd(shm);
320 tee_shm_put(shm);
330 struct tee_shm *shm;
339 shm = tee_shm_register_user_buf(ctx, data.addr, data.length);
340 if (IS_ERR(shm))
341 return PTR_ERR(shm);
343 data.id = shm->id;
344 data.length = shm->size;
349 ret = tee_shm_get_fd(shm);
355 tee_shm_put(shm);
366 struct tee_shm *shm;
405 shm = tee_shm_get_from_id(ctx, ip.c);
406 if (IS_ERR(shm))
407 return PTR_ERR(shm);
415 (ip.a + ip.b) > shm->size) {
416 tee_shm_put(shm);
421 shm = NULL;
428 params[n].u.memref.shm = shm;
538 params[n].u.memref.shm)
539 tee_shm_put(params[n].u.memref.shm);
600 params[n].u.memref.shm)
601 tee_shm_put(params[n].u.memref.shm);
659 if (!p->u.memref.shm) {
661 ip.c = (u64)-1; /* invalid shm id */
665 ip.c = p->u.memref.shm->id;
766 p->u.memref.shm = NULL;