|
1 | 1 | // SPDX-License-Identifier: GPL-2.0-only |
2 | 2 | /* |
3 | | - * Copyright (c) 2015-2021, Linaro Limited |
| 3 | + * Copyright (c) 2015-2021, 2023 Linaro Limited |
4 | 4 | * Copyright (c) 2016, EPAM Systems |
5 | 5 | */ |
6 | 6 |
|
@@ -967,34 +967,6 @@ static int optee_smc_do_call_with_arg(struct tee_context *ctx, |
967 | 967 | return rc; |
968 | 968 | } |
969 | 969 |
|
970 | | -static int simple_call_with_arg(struct tee_context *ctx, u32 cmd) |
971 | | -{ |
972 | | - struct optee_shm_arg_entry *entry; |
973 | | - struct optee_msg_arg *msg_arg; |
974 | | - struct tee_shm *shm; |
975 | | - u_int offs; |
976 | | - |
977 | | - msg_arg = optee_get_msg_arg(ctx, 0, &entry, &shm, &offs); |
978 | | - if (IS_ERR(msg_arg)) |
979 | | - return PTR_ERR(msg_arg); |
980 | | - |
981 | | - msg_arg->cmd = cmd; |
982 | | - optee_smc_do_call_with_arg(ctx, shm, offs, false); |
983 | | - |
984 | | - optee_free_msg_arg(ctx, entry, offs); |
985 | | - return 0; |
986 | | -} |
987 | | - |
988 | | -static int optee_smc_do_bottom_half(struct tee_context *ctx) |
989 | | -{ |
990 | | - return simple_call_with_arg(ctx, OPTEE_MSG_CMD_DO_BOTTOM_HALF); |
991 | | -} |
992 | | - |
993 | | -static int optee_smc_stop_async_notif(struct tee_context *ctx) |
994 | | -{ |
995 | | - return simple_call_with_arg(ctx, OPTEE_MSG_CMD_STOP_ASYNC_NOTIF); |
996 | | -} |
997 | | - |
998 | 970 | /* |
999 | 971 | * 5. Asynchronous notification |
1000 | 972 | */ |
@@ -1050,7 +1022,7 @@ static irqreturn_t notif_irq_thread_fn(int irq, void *dev_id) |
1050 | 1022 | { |
1051 | 1023 | struct optee *optee = dev_id; |
1052 | 1024 |
|
1053 | | - optee_smc_do_bottom_half(optee->ctx); |
| 1025 | + optee_do_bottom_half(optee->ctx); |
1054 | 1026 |
|
1055 | 1027 | return IRQ_HANDLED; |
1056 | 1028 | } |
@@ -1088,7 +1060,7 @@ static void notif_pcpu_irq_work_fn(struct work_struct *work) |
1088 | 1060 | notif_pcpu_work); |
1089 | 1061 | struct optee *optee = container_of(optee_smc, struct optee, smc); |
1090 | 1062 |
|
1091 | | - optee_smc_do_bottom_half(optee->ctx); |
| 1063 | + optee_do_bottom_half(optee->ctx); |
1092 | 1064 | } |
1093 | 1065 |
|
1094 | 1066 | static int init_pcpu_irq(struct optee *optee, u_int irq) |
@@ -1160,7 +1132,7 @@ static void uninit_pcpu_irq(struct optee *optee) |
1160 | 1132 | static void optee_smc_notif_uninit_irq(struct optee *optee) |
1161 | 1133 | { |
1162 | 1134 | if (optee->smc.sec_caps & OPTEE_SMC_SEC_CAP_ASYNC_NOTIF) { |
1163 | | - optee_smc_stop_async_notif(optee->ctx); |
| 1135 | + optee_stop_async_notif(optee->ctx); |
1164 | 1136 | if (optee->smc.notif_irq) { |
1165 | 1137 | if (irq_is_percpu_devid(optee->smc.notif_irq)) |
1166 | 1138 | uninit_pcpu_irq(optee); |
|
0 commit comments