From 7487116b41e6c06d3903b600a2231d2a68d0c4a4 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Thu, 19 Mar 2020 21:55:12 +0530 Subject: 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 Reviewed-by: Atish Patra --- include/sbi/sbi_ecall.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'include/sbi/sbi_ecall.h') diff --git a/include/sbi/sbi_ecall.h b/include/sbi/sbi_ecall.h index 1b56496..0b92e67 100644 --- a/include/sbi/sbi_ecall.h +++ b/include/sbi/sbi_ecall.h @@ -19,16 +19,13 @@ struct sbi_trap_regs; struct sbi_trap_info; -struct sbi_scratch; struct sbi_ecall_extension { struct sbi_dlist head; unsigned long extid_start; unsigned long extid_end; - int (* probe)(struct sbi_scratch *scratch, - unsigned long extid, unsigned long *out_val); - int (* handle)(struct sbi_scratch *scratch, - unsigned long extid, unsigned long funcid, + int (* probe)(unsigned long extid, unsigned long *out_val); + int (* handle)(unsigned long extid, unsigned long funcid, unsigned long *args, unsigned long *out_val, struct sbi_trap_info *out_trap); }; @@ -51,8 +48,7 @@ int sbi_ecall_register_extension(struct sbi_ecall_extension *ext); void sbi_ecall_unregister_extension(struct sbi_ecall_extension *ext); -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 sbi_ecall_init(void); -- cgit v1.2.3