aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_64.S
diff options
context:
space:
mode:
authorSonny Rao <sonnyrao@us.ibm.com>2008-07-11 19:00:26 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-14 22:29:28 -0400
commitb6f6b98a4e91fcf31db7de54c3aa86252fc6fb5f (patch)
treecf28721da06565509e05b7a9b1fa24f69b93f3e6 /arch/powerpc/kernel/head_64.S
parentcd6f37be7fdc9fea407379745350f6630b9d3cdd (diff)
powerpc: Don't spin on sync instruction at boot time
Push the sync below the secondary smp init hold loop and comment its purpose. This should speed up boot by reducing global traffic during the single-threaded portion of boot. Signed-off-by: Sonny Rao <sonnyrao@us.ibm.com> Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r--arch/powerpc/kernel/head_64.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index ecced1eb03ae..cc8fb474d520 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1198,7 +1198,6 @@ _GLOBAL(generic_secondary_smp_init)
11983: HMT_LOW 11983: HMT_LOW
1199 lbz r23,PACAPROCSTART(r13) /* Test if this processor should */ 1199 lbz r23,PACAPROCSTART(r13) /* Test if this processor should */
1200 /* start. */ 1200 /* start. */
1201 sync
1202 1201
1203#ifndef CONFIG_SMP 1202#ifndef CONFIG_SMP
1204 b 3b /* Never go on non-SMP */ 1203 b 3b /* Never go on non-SMP */
@@ -1206,6 +1205,8 @@ _GLOBAL(generic_secondary_smp_init)
1206 cmpwi 0,r23,0 1205 cmpwi 0,r23,0
1207 beq 3b /* Loop until told to go */ 1206 beq 3b /* Loop until told to go */
1208 1207
1208 sync /* order paca.run and cur_cpu_spec */
1209
1209 /* See if we need to call a cpu state restore handler */ 1210 /* See if we need to call a cpu state restore handler */
1210 LOAD_REG_IMMEDIATE(r23, cur_cpu_spec) 1211 LOAD_REG_IMMEDIATE(r23, cur_cpu_spec)
1211 ld r23,0(r23) 1212 ld r23,0(r23)