Lines Matching refs:ctx
118 * @ctx: calling context
126 u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
128 struct optee *optee = tee_get_drvdata(ctx->teedev);
158 optee_handle_rpc(ctx, ¶m, &call_ctx);
175 static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
183 shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params),
210 int optee_open_session(struct tee_context *ctx,
214 struct optee_context_data *ctxdata = ctx->data;
223 shm = get_msg_arg(ctx, arg->num_params + 2, &msg_arg, &msg_parg);
257 if (optee_do_call_with_arg(ctx, msg_parg)) {
276 optee_close_session(ctx, msg_arg->session);
288 int optee_close_session(struct tee_context *ctx, u32 session)
290 struct optee_context_data *ctxdata = ctx->data;
306 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
312 optee_do_call_with_arg(ctx, msg_parg);
318 int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
321 struct optee_context_data *ctxdata = ctx->data;
335 shm = get_msg_arg(ctx, arg->num_params, &msg_arg, &msg_parg);
347 if (optee_do_call_with_arg(ctx, msg_parg)) {
364 int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
366 struct optee_context_data *ctxdata = ctx->data;
379 shm = get_msg_arg(ctx, 0, &msg_arg, &msg_parg);
386 optee_do_call_with_arg(ctx, msg_parg);
611 int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
632 shm_arg = get_msg_arg(ctx, 1, &msg_arg, &msg_parg);
653 if (optee_do_call_with_arg(ctx, msg_parg) ||
663 int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
670 shm_arg = get_msg_arg(ctx, 1, &msg_arg, &msg_parg);
679 if (optee_do_call_with_arg(ctx, msg_parg) ||
686 int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
697 int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm)