mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-08 05:58:59 +00:00
lib: sbi: change prototype of sbi_trap_redirect
sbi_trap_redirect now uses const pointer to `trap`. This ensures the caller that we never change `trap` in sbi_trap_redirect. Signed-off-by: Bo Gan <ganboing@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
2471cf2e6c
commit
a17600c186
2 changed files with 2 additions and 2 deletions
|
@ -225,7 +225,7 @@ static inline unsigned long sbi_regs_gva(const struct sbi_trap_regs *regs)
|
||||||
}
|
}
|
||||||
|
|
||||||
int sbi_trap_redirect(struct sbi_trap_regs *regs,
|
int sbi_trap_redirect(struct sbi_trap_regs *regs,
|
||||||
struct sbi_trap_info *trap);
|
const struct sbi_trap_info *trap);
|
||||||
|
|
||||||
struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs);
|
struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs);
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static void __noreturn sbi_trap_error(const char *msg, int rc,
|
||||||
* @return 0 on success and negative error code on failure
|
* @return 0 on success and negative error code on failure
|
||||||
*/
|
*/
|
||||||
int sbi_trap_redirect(struct sbi_trap_regs *regs,
|
int sbi_trap_redirect(struct sbi_trap_regs *regs,
|
||||||
struct sbi_trap_info *trap)
|
const struct sbi_trap_info *trap)
|
||||||
{
|
{
|
||||||
ulong hstatus, vsstatus, prev_mode;
|
ulong hstatus, vsstatus, prev_mode;
|
||||||
#if __riscv_xlen == 32
|
#if __riscv_xlen == 32
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue