Lines Matching defs:shm
292 struct tee_shm *shm;
301 shm = tee_shm_alloc_user_buf(ctx, data.size);
302 if (IS_ERR(shm))
303 return PTR_ERR(shm);
305 data.id = shm->id;
306 data.size = shm->size;
311 ret = tee_shm_get_fd(shm);
318 tee_shm_put(shm);
328 struct tee_shm *shm;
337 shm = tee_shm_register_user_buf(ctx, data.addr, data.length);
338 if (IS_ERR(shm))
339 return PTR_ERR(shm);
341 data.id = shm->id;
342 data.length = shm->size;
347 ret = tee_shm_get_fd(shm);
353 tee_shm_put(shm);
364 struct tee_shm *shm;
403 shm = tee_shm_get_from_id(ctx, ip.c);
404 if (IS_ERR(shm))
405 return PTR_ERR(shm);
413 (ip.a + ip.b) > shm->size) {
414 tee_shm_put(shm);
419 shm = NULL;
426 params[n].u.memref.shm = shm;
536 params[n].u.memref.shm)
537 tee_shm_put(params[n].u.memref.shm);
598 params[n].u.memref.shm)
599 tee_shm_put(params[n].u.memref.shm);
657 if (!p->u.memref.shm) {
659 ip.c = (u64)-1; /* invalid shm id */
663 ip.c = p->u.memref.shm->id;
764 p->u.memref.shm = NULL;