Skip to content

Commit f77093e

Browse files
chenhuacaigregkh
authored andcommitted
LoongArch: Mask all interrupts during kexec/kdump
[ Upstream commit 863a320 ] If the default state of the interrupt controllers in the first kernel don't mask any interrupts, it may cause the second kernel to potentially receive interrupts (which were previously allocated by the first kernel) immediately after a CPU becomes online during its boot process. These interrupts cannot be properly routed, leading to bad IRQ issues. This patch calls machine_kexec_mask_interrupts() to mask all interrupts during the kexec/kdump process. Signed-off-by: Tianyang Zhang <zhangtianyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9a92af9 commit f77093e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/loongarch/kernel/machine_kexec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ void machine_crash_shutdown(struct pt_regs *regs)
249249
#ifdef CONFIG_SMP
250250
crash_smp_send_stop();
251251
#endif
252+
machine_kexec_mask_interrupts();
252253
cpumask_set_cpu(crashing_cpu, &cpus_in_crash);
253254

254255
pr_info("Starting crashdump kernel...\n");
@@ -286,6 +287,7 @@ void machine_kexec(struct kimage *image)
286287

287288
/* We do not want to be bothered. */
288289
local_irq_disable();
290+
machine_kexec_mask_interrupts();
289291

290292
pr_notice("EFI boot flag 0x%lx\n", efi_boot);
291293
pr_notice("Command line at 0x%lx\n", cmdline_ptr);

0 commit comments

Comments
 (0)