Skip to content

Commit 754b404

Browse files
dczhugregkh
authored andcommitted
MIPS: kexec: Mark CPU offline before disabling local IRQ
[ Upstream commit dc57aaf ] After changing CPU online status, it will not be sent any IPIs such as in __flush_cache_all() on software coherency systems. Do this before disabling local IRQ. Signed-off-by: Dengcheng Zhu <dzhu@wavecomp.com> Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/20571/ Cc: pburton@wavecomp.com Cc: ralf@linux-mips.org Cc: linux-mips@linux-mips.org Cc: rachel.mozes@intel.com Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e066306 commit 754b404

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎arch/mips/kernel/crash.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ static void crash_shutdown_secondary(void *passed_regs)
3636
if (!cpu_online(cpu))
3737
return;
3838

39+
/* We won't be sent IPIs any more. */
40+
set_cpu_online(cpu, false);
41+
3942
local_irq_disable();
4043
if (!cpumask_test_cpu(cpu, &cpus_in_crash))
4144
crash_save_cpu(regs, cpu);

‎arch/mips/kernel/machine_kexec.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ machine_kexec(struct kimage *image)
118118
*ptr = (unsigned long) phys_to_virt(*ptr);
119119
}
120120

121+
/* Mark offline BEFORE disabling local irq. */
122+
set_cpu_online(smp_processor_id(), false);
123+
121124
/*
122125
* we do not want to be bothered.
123126
*/

0 commit comments

Comments
 (0)