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 <abres...@chromium.org>
Cc: James Hogan <james.ho...@imgtec.com>
Cc: Maciej W. Rozycki <ma...@linux-mips.org>
---
New for v2.
---
 arch/mips/kernel/smp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 1c0d8c5..5b020bd 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -176,10 +176,8 @@ static void stop_this_cpu(void *dummy)
         * Remove this CPU:
         */
        set_cpu_online(smp_processor_id(), false);
-       for (;;) {
-               if (cpu_wait)
-                       (*cpu_wait)();          /* Wait if available. */
-       }
+       local_irq_disable();
+       while (1);
 }
 
 void smp_send_stop(void)
-- 
2.2.0.rc0.207.ga3a616c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to