Lines Matching full:optee
34 * (optee->rpc_param_count).
217 void optee_shm_arg_cache_init(struct optee *optee, u32 flags) in optee_shm_arg_cache_init() argument
219 INIT_LIST_HEAD(&optee->shm_arg_cache.shm_args); in optee_shm_arg_cache_init()
220 mutex_init(&optee->shm_arg_cache.mutex); in optee_shm_arg_cache_init()
221 optee->shm_arg_cache.flags = flags; in optee_shm_arg_cache_init()
224 void optee_shm_arg_cache_uninit(struct optee *optee) in optee_shm_arg_cache_uninit() argument
226 struct list_head *head = &optee->shm_arg_cache.shm_args; in optee_shm_arg_cache_uninit()
229 mutex_destroy(&optee->shm_arg_cache.mutex); in optee_shm_arg_cache_uninit()
269 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_get_msg_arg() local
270 size_t sz = optee_msg_arg_size(optee->rpc_param_count); in optee_get_msg_arg()
281 if (optee->shm_arg_cache.flags & OPTEE_SHM_ARG_SHARED) in optee_get_msg_arg()
286 mutex_lock(&optee->shm_arg_cache.mutex); in optee_get_msg_arg()
287 list_for_each_entry(entry, &optee->shm_arg_cache.shm_args, list_node) { in optee_get_msg_arg()
302 if (optee->shm_arg_cache.flags & OPTEE_SHM_ARG_ALLOC_PRIV) in optee_get_msg_arg()
312 list_add(&entry->list_node, &optee->shm_arg_cache.shm_args); in optee_get_msg_arg()
328 mutex_unlock(&optee->shm_arg_cache.mutex); in optee_get_msg_arg()
343 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_free_msg_arg() local
344 size_t sz = optee_msg_arg_size(optee->rpc_param_count); in optee_free_msg_arg()
353 mutex_lock(&optee->shm_arg_cache.mutex); in optee_free_msg_arg()
359 mutex_unlock(&optee->shm_arg_cache.mutex); in optee_free_msg_arg()
366 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_open_session() local
402 rc = optee->ops->to_msg_param(optee, msg_arg->params + 2, in optee_open_session()
413 if (optee->ops->do_call_with_arg(ctx, shm, offs, in optee_open_session()
429 if (optee->ops->from_msg_param(optee, param, arg->num_params, in optee_open_session()
448 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_system_session() local
457 optee_cq_incr_sys_thread_count(&optee->call_queue))) { in optee_system_session()
470 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_close_session_helper() local
482 optee->ops->do_call_with_arg(ctx, shm, offs, system_thread); in optee_close_session_helper()
487 optee_cq_decr_sys_thread_count(&optee->call_queue); in optee_close_session_helper()
515 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_invoke_func() local
543 rc = optee->ops->to_msg_param(optee, msg_arg->params, arg->num_params, in optee_invoke_func()
548 if (optee->ops->do_call_with_arg(ctx, shm, offs, system_thread)) { in optee_invoke_func()
553 if (optee->ops->from_msg_param(optee, param, arg->num_params, in optee_invoke_func()
568 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_cancel_req() local
593 optee->ops->do_call_with_arg(ctx, shm, offs, system_thread); in optee_cancel_req()
646 struct optee *optee = tee_get_drvdata(ctx->teedev); in simple_call_with_arg() local
657 optee->ops->do_call_with_arg(ctx, shm, offs, false); in simple_call_with_arg()