summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ecall.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-03-19 19:25:12 +0300
committerAnup Patel <anup@brainfault.org>2020-03-28 11:02:20 +0300
commit7487116b41e6c06d3903b600a2231d2a68d0c4a4 (patch)
tree1ed0174c5271e57a4554d8bdd6ffea16cbe60b2a /lib/sbi/sbi_ecall.c
parentfe37d7da29f67ae8ccc31f06e0f3e6c9a6b58054 (diff)
downloadopensbi-7487116b41e6c06d3903b600a2231d2a68d0c4a4.tar.xz
lib: sbi_ecall: Remove mcause, scratch and hartid parameters
We remove mcause, scratch and hartid parameters from various functions for ecall handling because we can always get current HART id and current scratch pointer using just one CSR access. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ecall.c')
-rw-r--r--lib/sbi/sbi_ecall.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sbi/sbi_ecall.c b/lib/sbi/sbi_ecall.c
index 230dfa3..6c42553 100644
--- a/lib/sbi/sbi_ecall.c
+++ b/lib/sbi/sbi_ecall.c
@@ -79,8 +79,7 @@ void sbi_ecall_unregister_extension(struct sbi_ecall_extension *ext)
sbi_list_del_init(&ext->head);
}
-int sbi_ecall_handler(u32 hartid, ulong mcause, struct sbi_trap_regs *regs,
- struct sbi_scratch *scratch)
+int sbi_ecall_handler(struct sbi_trap_regs *regs)
{
int ret = 0;
struct sbi_ecall_extension *ext;
@@ -100,7 +99,7 @@ int sbi_ecall_handler(u32 hartid, ulong mcause, struct sbi_trap_regs *regs,
ext = sbi_ecall_find_extension(extension_id);
if (ext && ext->handle) {
- ret = ext->handle(scratch, extension_id, func_id,
+ ret = ext->handle(extension_id, func_id,
args, &out_val, &trap);
if (extension_id >= SBI_EXT_0_1_SET_TIMER &&
extension_id <= SBI_EXT_0_1_SHUTDOWN)