aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/head_64.S13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 73d6e9afcdf1..ba504099844a 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -218,13 +218,19 @@ generic_secondary_common_init:
218 */ 218 */
219 LOAD_REG_ADDR(r13, paca) /* Load paca pointer */ 219 LOAD_REG_ADDR(r13, paca) /* Load paca pointer */
220 ld r13,0(r13) /* Get base vaddr of paca array */ 220 ld r13,0(r13) /* Get base vaddr of paca array */
221#ifndef CONFIG_SMP
222 addi r13,r13,PACA_SIZE /* know r13 if used accidentally */
223 b .kexec_wait /* wait for next kernel if !SMP */
224#else
225 LOAD_REG_ADDR(r7, nr_cpu_ids) /* Load nr_cpu_ids address */
226 lwz r7,0(r7) /* also the max paca allocated */
221 li r5,0 /* logical cpu id */ 227 li r5,0 /* logical cpu id */
2221: lhz r6,PACAHWCPUID(r13) /* Load HW procid from paca */ 2281: lhz r6,PACAHWCPUID(r13) /* Load HW procid from paca */
223 cmpw r6,r24 /* Compare to our id */ 229 cmpw r6,r24 /* Compare to our id */
224 beq 2f 230 beq 2f
225 addi r13,r13,PACA_SIZE /* Loop to next PACA on miss */ 231 addi r13,r13,PACA_SIZE /* Loop to next PACA on miss */
226 addi r5,r5,1 232 addi r5,r5,1
227 cmpwi r5,NR_CPUS 233 cmpw r5,r7 /* Check if more pacas exist */
228 blt 1b 234 blt 1b
229 235
230 mr r3,r24 /* not found, copy phys to r3 */ 236 mr r3,r24 /* not found, copy phys to r3 */
@@ -259,9 +265,6 @@ generic_secondary_common_init:
2594: HMT_LOW 2654: HMT_LOW
260 lbz r23,PACAPROCSTART(r13) /* Test if this processor should */ 266 lbz r23,PACAPROCSTART(r13) /* Test if this processor should */
261 /* start. */ 267 /* start. */
262#ifndef CONFIG_SMP
263 b 4b /* Never go on non-SMP */
264#else
265 cmpwi 0,r23,0 268 cmpwi 0,r23,0
266 beq 4b /* Loop until told to go */ 269 beq 4b /* Loop until told to go */
267 270
@@ -273,7 +276,7 @@ generic_secondary_common_init:
273 subi r1,r1,STACK_FRAME_OVERHEAD 276 subi r1,r1,STACK_FRAME_OVERHEAD
274 277
275 b __secondary_start 278 b __secondary_start
276#endif 279#endif /* SMP */
277 280
278/* 281/*
279 * Turn the MMU off. 282 * Turn the MMU off.