aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp.c
diff options
context:
space:
mode:
authorAndrew Bresticker <abrestic@chromium.org>2015-03-25 13:25:43 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-04-01 11:21:58 -0400
commitea925a72a271f6868dddef98426b396f110da211 (patch)
treef22ab20639cefba3ff69a2b3e245ac5baf8ce936 /arch/mips/kernel/smp.c
parentc1bed31f9c67f7d315ba13e6eb215fb412a33514 (diff)
MIPS: smp: Make stop_this_cpu() actually stop the CPU
Since cpu_wait() enables interrupts upon return, CPUs which have entered stop_this_cpu() may still end up handling interrupts. This can lead to the softlockup detector firing on a panic or restart/poweroff/halt. Just disable interrupts and spin to ensure nothing else runs on the CPU once it has entered stop_this_cpu(). Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/9601/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r--arch/mips/kernel/smp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 1c0d8c50b7e1..5b020bda3e05 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -176,10 +176,8 @@ static void stop_this_cpu(void *dummy)
176 * Remove this CPU: 176 * Remove this CPU:
177 */ 177 */
178 set_cpu_online(smp_processor_id(), false); 178 set_cpu_online(smp_processor_id(), false);
179 for (;;) { 179 local_irq_disable();
180 if (cpu_wait) 180 while (1);
181 (*cpu_wait)(); /* Wait if available. */
182 }
183} 181}
184 182
185void smp_send_stop(void) 183void smp_send_stop(void)