Lines Matching refs:shm
104 msg.buf = params[2].u.memref.shm->kaddr;
268 struct tee_shm *shm;
281 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c);
283 return shm;
292 struct tee_shm *shm;
314 shm = cmd_alloc_suppl(ctx, sz);
317 shm = tee_shm_alloc(optee->ctx, sz,
325 if (IS_ERR(shm)) {
330 if (tee_shm_get_pa(shm, 0, &pa)) {
335 sz = tee_shm_get_size(shm);
337 if (tee_shm_is_registered(shm)) {
342 pages = tee_shm_get_pages(shm, &page_num);
364 (tee_shm_get_page_offset(shm) &
366 arg->params[0].u.tmem.size = tee_shm_get_size(shm);
367 arg->params[0].u.tmem.shm_ref = (unsigned long)shm;
370 tee_shm_get_page_offset(shm));
375 arg->params[0].u.tmem.shm_ref = (unsigned long)shm;
381 tee_shm_free(shm);
384 static void cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm)
390 param.u.value.b = tee_shm_get_id(shm);
404 tee_shm_put(shm);
412 struct tee_shm *shm;
422 shm = (struct tee_shm *)(unsigned long)arg->params[0].u.value.b;
425 cmd_free_suppl(ctx, shm);
428 tee_shm_free(shm);
452 struct tee_shm *shm,
457 arg = tee_shm_get_va(shm, 0);
459 pr_err("%s: tee_shm_get_va %p failed\n", __func__, shm);
501 struct tee_shm *shm;
506 shm = tee_shm_alloc(optee->ctx, param->a1,
508 if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
511 (unsigned long)shm);
520 shm = reg_pair_to_ptr(param->a1, param->a2);
521 tee_shm_free(shm);
532 shm = reg_pair_to_ptr(param->a1, param->a2);
533 handle_rpc_func_cmd(ctx, optee, shm, call_ctx);