From ab7b4cf4308dd2895fe7fb6c112c29c81338fd57 Mon Sep 17 00:00:00 2001 From: Chris Fries Date: Wed, 8 May 2013 16:43:17 -0500 Subject: ARM: smp: Wait just 1 second for other CPU to halt Currently, the busyloop waiting for a 2nd CPU to stop takes about 4 seconds. Adjust for the overhead of the loop by looping every 1ms instead of 1us. Signed-off-by: Chris Fries Reviewed-on: http://gerrit.pcs.mot.com/537864 SLT-Approved: Slta Waiver Tested-by: Jira Key Reviewed-by: Check Patch Reviewed-by: Klocwork kwcheck Reviewed-by: Igor Kovalenko Reviewed-by: Russell Knize Submit-Approved: Jira Key Signed-off-by: Pranav Vashi Signed-off-by: franciscofranco Signed-off-by: engstk Conflicts: arch/arm/kernel/smp.c --- arch/arm/kernel/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 5c5842d69..3a2b50b8b 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -778,9 +778,9 @@ void smp_send_stop(void) smp_cross_call(&mask, IPI_CPU_STOP); /* Wait up to one second for other CPUs to stop */ - timeout = USEC_PER_SEC; - while (num_online_cpus() > 1 && timeout--) - udelay(1); + timeout = MSEC_PER_SEC; + while (num_active_cpus() > 1 && timeout--) + mdelay(1); if (num_online_cpus() > 1) pr_warning("SMP: failed to stop secondary CPUs\n"); -- cgit v1.2.3