ARM: Don't send IPI in smp_send_stop if there's only one CPU
authorTony Lindgren <tony@atomide.com>
Mon, 20 Sep 2010 21:47:55 +0000 (14:47 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 29 Sep 2010 18:18:42 +0000 (11:18 -0700)
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>
arch/arm/kernel/smp.c

index 40dc74f..32e16da 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);
 }
 
 /*