aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Fries <C.Fries@motorola.com>2013-05-08 16:43:17 -0500
committerMoyster <oysterized@gmail.com>2016-09-18 19:40:30 +0200
commitab7b4cf4308dd2895fe7fb6c112c29c81338fd57 (patch)
tree46abeb2440f6a7d088df85f88624baab7cb4d2ab
parent68d8a702c4554bab85c2f481b2f7b882fef09a4f (diff)
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 <C.Fries@motorola.com> Reviewed-on: http://gerrit.pcs.mot.com/537864 SLT-Approved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Check Patch <CHEKPACH@motorola.com> Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com> Reviewed-by: Igor Kovalenko <cik009@motorola.com> Reviewed-by: Russell Knize <rknize2@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com> Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com> Signed-off-by: engstk <eng.stk@sapo.pt> Conflicts: arch/arm/kernel/smp.c
-rw-r--r--arch/arm/kernel/smp.c6
1 files 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");