Skip to content

Commit 863a320

Browse files
committed
LoongArch: Mask all interrupts during kexec/kdump
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 <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent acf5de1 commit 863a320

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/loongarch/kernel/machine_kexec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ void machine_crash_shutdown(struct pt_regs *regs)
237237
#ifdef CONFIG_SMP
238238
crash_smp_send_stop();
239239
#endif
240+
machine_kexec_mask_interrupts();
240241
cpumask_set_cpu(crashing_cpu, &cpus_in_crash);
241242

242243
pr_info("Starting crashdump kernel...\n");
@@ -274,6 +275,7 @@ void machine_kexec(struct kimage *image)
274275

275276
/* We do not want to be bothered. */
276277
local_irq_disable();
278+
machine_kexec_mask_interrupts();
277279

278280
pr_notice("EFI boot flag: 0x%lx\n", efi_boot);
279281
pr_notice("Command line addr: 0x%lx\n", cmdline_ptr);

0 commit comments

Comments
 (0)