summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-06-06 16:08:32 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2017-07-02 13:40:24 +0300
commit4e287e655e108cbbd6e3e7dcc49d591c8aa5a8a4 (patch)
treea7f03b60ca119fe6aaf6abed611a4374444ed172 /arch/powerpc/kernel/smp.c
parentede8e2bbb0eb3370e4dc5484b40eb22850a09b92 (diff)
downloadlinux-4e287e655e108cbbd6e3e7dcc49d591c8aa5a8a4.tar.xz
powerpc: use spin loop primitives in some functions
Use the different spin loop primitives in some simple powerpc spin loops, including those which will spin as a common case. This will help to test the spin loop primitives before more conversions are done. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Add some includes of <linux/processor.h>] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 418019728efa..a975ddf77200 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -33,6 +33,7 @@
#include <linux/notifier.h>
#include <linux/topology.h>
#include <linux/profile.h>
+#include <linux/processor.h>
#include <asm/ptrace.h>
#include <linux/atomic.h>
@@ -767,8 +768,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
smp_ops->give_timebase();
/* Wait until cpu puts itself in the online & active maps */
- while (!cpu_online(cpu))
- cpu_relax();
+ spin_until_cond(cpu_online(cpu));
return 0;
}