]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: kexec: Fixup irq controller broken in kexec crash path
authorGuo Ren <guoren@linux.alibaba.com>
Thu, 20 Oct 2022 14:16:02 +0000 (10:16 -0400)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 30 Nov 2022 05:50:58 +0000 (21:50 -0800)
commit0aea3ebd169a2a254b0d2b3ea096eae956a0842d
tree839898de2b24078bdc33d8b87228d4d148a3548c
parentf9cd8e124bf669aeea2383cd3379e3e16e75ceea
riscv: kexec: Fixup irq controller broken in kexec crash path

If a crash happens on cpu3 and all interrupts are binding on cpu0, the
bad irq routing will cause a crash kernel which can't receive any irq.
Because crash kernel won't clean up all harts' PLIC enable bits in
enable registers. This patch is similar to 0e735dc4705f ("ARM: 7316/1:
kexec: EOI active and mask all interrupts in kexec crash path") and
1edcc040848f ("arm64: kdump: implement machine_crash_shutdown()"), and
PowerPC also has the same mechanism.

Fixes: 6bab032a4f17 ("RISC-V: Add kexec support")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Xianting Tian <xianting.tian@linux.alibaba.com>
Cc: Nick Kossifidis <mick@ics.forth.gr>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20221020141603.2856206-2-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/machine_kexec.c