Commit b6f6b98a authored by Sonny Rao's avatar Sonny Rao Committed by Benjamin Herrenschmidt

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: default avatarSonny Rao <sonnyrao@us.ibm.com>
Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent cd6f37be
...@@ -1198,7 +1198,6 @@ _GLOBAL(generic_secondary_smp_init) ...@@ -1198,7 +1198,6 @@ _GLOBAL(generic_secondary_smp_init)
3: HMT_LOW 3: HMT_LOW
lbz r23,PACAPROCSTART(r13) /* Test if this processor should */ lbz r23,PACAPROCSTART(r13) /* Test if this processor should */
/* start. */ /* start. */
sync
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
b 3b /* Never go on non-SMP */ b 3b /* Never go on non-SMP */
...@@ -1206,6 +1205,8 @@ _GLOBAL(generic_secondary_smp_init) ...@@ -1206,6 +1205,8 @@ _GLOBAL(generic_secondary_smp_init)
cmpwi 0,r23,0 cmpwi 0,r23,0
beq 3b /* Loop until told to go */ beq 3b /* Loop until told to go */
sync /* order paca.run and cur_cpu_spec */
/* See if we need to call a cpu state restore handler */ /* See if we need to call a cpu state restore handler */
LOAD_REG_IMMEDIATE(r23, cur_cpu_spec) LOAD_REG_IMMEDIATE(r23, cur_cpu_spec)
ld r23,0(r23) ld r23,0(r23)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment