aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/smp.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index e16ec7b3b427..3582f30b60b7 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -565,11 +565,7 @@ void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *))
565} 565}
566#endif 566#endif
567 567
568#ifdef CONFIG_NMI_IPI
569static void stop_this_cpu(struct pt_regs *regs)
570#else
571static void stop_this_cpu(void *dummy) 568static void stop_this_cpu(void *dummy)
572#endif
573{ 569{
574 /* Remove this CPU */ 570 /* Remove this CPU */
575 set_cpu_online(smp_processor_id(), false); 571 set_cpu_online(smp_processor_id(), false);
@@ -580,10 +576,26 @@ static void stop_this_cpu(void *dummy)
580 spin_cpu_relax(); 576 spin_cpu_relax();
581} 577}
582 578
579#ifdef CONFIG_NMI_IPI
580static void nmi_stop_this_cpu(struct pt_regs *regs)
581{
582 /*
583 * This is a special case because it never returns, so the NMI IPI
584 * handling would never mark it as done, which makes any later
585 * smp_send_nmi_ipi() call spin forever. Mark it done now.
586 */
587 nmi_ipi_lock();
588 nmi_ipi_busy_count--;
589 nmi_ipi_unlock();
590
591 stop_this_cpu(NULL);
592}
593#endif
594
583void smp_send_stop(void) 595void smp_send_stop(void)
584{ 596{
585#ifdef CONFIG_NMI_IPI 597#ifdef CONFIG_NMI_IPI
586 smp_send_nmi_ipi(NMI_IPI_ALL_OTHERS, stop_this_cpu, 1000000); 598 smp_send_nmi_ipi(NMI_IPI_ALL_OTHERS, nmi_stop_this_cpu, 1000000);
587#else 599#else
588 smp_call_function(stop_this_cpu, NULL, 0); 600 smp_call_function(stop_this_cpu, NULL, 0);
589#endif 601#endif