ARM: 6402/1: Don't send IPI in smp_send_stop if there's only one CPU
authorTony Lindgren <tony@atomide.com>
Mon, 20 Sep 2010 23:43:19 +0000 (00:43 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 4 Oct 2010 19:23:36 +0000 (20:23 +0100)
No need to send IPI if there's one CPU, especially when booting
systems with CONFIG_SMP_ON_UP that may not even support IPI.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/smp.c

index 40dc74f2b27f3362f8739f5e9898963dd27a221b..32e16da5cbceeaf4142f230576791ec506b572c3 100644 (file)
@@ -567,7 +567,8 @@ void smp_send_stop(void)
 {
        cpumask_t mask = cpu_online_map;
        cpu_clear(smp_processor_id(), mask);
-       send_ipi_message(&mask, IPI_CPU_STOP);
+       if (!cpus_empty(mask))
+               send_ipi_message(&mask, IPI_CPU_STOP);
 }
 
 /*