aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDengcheng Zhu <dzhu@wavecomp.com>2018-09-11 17:49:20 -0400
committerPaul Burton <paul.burton@mips.com>2018-09-21 17:25:20 -0400
commitdc57aaf95a516f70e2d527d8287a0332c481a226 (patch)
tree1af8e036c0c14822916a946f003495e518294782
parent8250a9b43b257f05c2aba6e8367fa636b630b0a2 (diff)
MIPS: kexec: Mark CPU offline before disabling local IRQ
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
-rw-r--r--arch/mips/kernel/crash.c3
-rw-r--r--arch/mips/kernel/machine_kexec.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/crash.c b/arch/mips/kernel/crash.c
index d455363d51c3..4c07a43a3242 100644
--- a/arch/mips/kernel/crash.c
+++ b/arch/mips/kernel/crash.c
@@ -36,6 +36,9 @@ static void crash_shutdown_secondary(void *passed_regs)
36 if (!cpu_online(cpu)) 36 if (!cpu_online(cpu))
37 return; 37 return;
38 38
39 /* We won't be sent IPIs any more. */
40 set_cpu_online(cpu, false);
41
39 local_irq_disable(); 42 local_irq_disable();
40 if (!cpumask_test_cpu(cpu, &cpus_in_crash)) 43 if (!cpumask_test_cpu(cpu, &cpus_in_crash))
41 crash_save_cpu(regs, cpu); 44 crash_save_cpu(regs, cpu);
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 8b574bcd39ba..4b3726e4fe3a 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -118,6 +118,9 @@ machine_kexec(struct kimage *image)
118 *ptr = (unsigned long) phys_to_virt(*ptr); 118 *ptr = (unsigned long) phys_to_virt(*ptr);
119 } 119 }
120 120
121 /* Mark offline BEFORE disabling local irq. */
122 set_cpu_online(smp_processor_id(), false);
123
121 /* 124 /*
122 * we do not want to be bothered. 125 * we do not want to be bothered.
123 */ 126 */