diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-05-09 16:47:23 -0700 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-10 09:59:16 +0530 |
commit | 63a513edeccee1758bbfe5111ccc4fbec8f18a12 (patch) | |
tree | 0b134fad4465b6cb69a9c69315f084104e1bb839 /lib/sbi/sbi_hart.c | |
parent | 7be75f519f7705367030258c4410d9ff9ea24a6f (diff) |
lib: Rename unprivileged trap handler
Unprivileged trap handler can be reused for any cases where the executing
code expects a trap.
Rename it to "expected" trap handler as it will be used in other cases in
future.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Tested-by: Jonathan Balkind <jbalkind@cs.princeton.edu>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r-- | lib/sbi/sbi_hart.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 24c3637..00e593f 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -17,10 +17,10 @@ #include <sbi/sbi_hart.h> #include <sbi/sbi_platform.h> -extern void __sbi_unpriv_trap(void); -extern void __sbi_unpriv_trap_hext(void); +extern void __sbi_expected_trap(void); +extern void __sbi_expected_trap_hext(void); -void (*sbi_hart_unpriv_trap)(void) = &__sbi_unpriv_trap; +void (*sbi_hart_expected_trap)(void) = &__sbi_expected_trap; static void mstatus_init(struct sbi_scratch *scratch, u32 hartid) { @@ -227,7 +227,7 @@ int sbi_hart_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot) if (cold_boot) { if (misa_extension('H')) - sbi_hart_unpriv_trap = &__sbi_unpriv_trap_hext; + sbi_hart_expected_trap = &__sbi_expected_trap_hext; } mstatus_init(scratch, hartid); |