linux/arch/riscv
Anup Patel 6a1ce99dc4
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: a4c3733d32 ("riscv: abstract out CSR names for supervisor vs machine mode")
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Tested-by: Palmer Dabbelt <palmerdabbelt@google.com> [QMEU virt machine with SMP]
[Palmer: Move the Fixes up to a newer commit]
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2020-02-18 10:34:04 -08:00
..
boot riscv: dts: Add DT support for SiFive FU540 GPIO driver 2020-01-29 14:58:08 +00:00
configs Merge branch 'next/defconfig-add-debug' into for-next 2019-11-22 18:59:23 -08:00
include riscv: set pmp configuration if kernel is running in M-mode 2020-02-18 09:41:24 -08:00
kernel RISC-V: Don't enable all interrupts in trap_init() 2020-02-18 10:34:04 -08:00
lib riscv: Add KASAN support 2020-01-22 13:09:58 -08:00
mm riscv: mm: add support for CONFIG_DEBUG_VIRTUAL 2020-01-23 10:40:06 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-12-27 14:20:10 -08:00
Kbuild riscv: add arch/riscv/Kbuild 2019-08-30 17:34:00 -07:00
Kconfig riscv: mm: add support for CONFIG_DEBUG_VIRTUAL 2020-01-23 10:40:06 -08:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs riscv: only select serial sifive if TTY is enabled 2019-12-08 20:29:01 -08:00
Makefile riscv: provide a flat image loader 2019-11-17 15:17:39 -08:00