Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / head_fsl_booke.S
index 4faeba247854c038078ef4362836d50b37f4f44a..529b817f473b13de52bea2ac0ae33e859e9e27c4 100644 (file)
@@ -152,8 +152,11 @@ _ENTRY(__early_start)
        /* Check to see if we're the second processor, and jump
         * to the secondary_start code if so
         */
-       mfspr   r24,SPRN_PIR
-       cmpwi   r24,0
+       lis     r24, boot_cpuid@h
+       ori     r24, r24, boot_cpuid@l
+       lwz     r24, 0(r24)
+       cmpwi   r24, -1
+       mfspr   r24,SPRN_PIR
        bne     __secondary_start
 #endif
 
@@ -175,6 +178,9 @@ _ENTRY(__early_start)
        li      r0,0
        stwu    r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1)
 
+       rlwinm  r22,r1,0,0,31-THREAD_SHIFT      /* current thread_info */
+       stw     r24, TI_CPU(r22)
+
        bl      early_init
 
 #ifdef CONFIG_RELOCATABLE