Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Don't enable all interrupts in trap_init()
Historically, we have been enabling all interrupts for each HART in trap_init(). Ideally, we should only enable M-mode interrupts for M-mode kernel and S-mode interrupts for S-mode kernel in trap_init(). Currently, we get suprious S-mode interrupts on Kendryte K210 board running M-mode NO-MMU kernel because we are enabling all interrupts in trap_init(). To fix this, we only enable software and external interrupt in trap_init(). In future, trap_init() will only enable software interrupt and PLIC driver will enable external interrupt using CPU notifiers. Fixes: a4c3733 ("riscv: abstract out CSR names for supervisor vs machine mode") Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]> Tested-by: Palmer Dabbelt <[email protected]> [QMEU virt machine with SMP] [Palmer: Move the Fixes up to a newer commit] Reviewed-by: Palmer Dabbelt <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
- Loading branch information