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