lib: sbi: Simplify parameters of misaligned and access fault handlers

The struct sbi_trap_context already has the information needed by
misaligned load/store and access fault load/store handlers so directly
pass struct sbi_trap_context pointer to these functions.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Clément Léger <cleger@rivosinc.com>
This commit is contained in:
Anup Patel
2024-03-11 15:21:53 +05:30
committed by Anup Patel
parent abea949721
commit fea33a9334
3 changed files with 40 additions and 47 deletions

View File

@@ -20,16 +20,12 @@ union sbi_ldst_data {
ulong data_ulong;
};
int sbi_misaligned_load_handler(struct sbi_trap_regs *regs,
const struct sbi_trap_info *orig_trap);
int sbi_misaligned_load_handler(struct sbi_trap_context *tcntx);
int sbi_misaligned_store_handler(struct sbi_trap_regs *regs,
const struct sbi_trap_info *orig_trap);
int sbi_misaligned_store_handler(struct sbi_trap_context *tcntx);
int sbi_load_access_handler(struct sbi_trap_regs *regs,
const struct sbi_trap_info *orig_trap);
int sbi_load_access_handler(struct sbi_trap_context *tcntx);
int sbi_store_access_handler(struct sbi_trap_regs *regs,
const struct sbi_trap_info *orig_trap);
int sbi_store_access_handler(struct sbi_trap_context *tcntx);
#endif