powerpc/cpumask: Update some comments
[safe/jmp/linux-2.6] / arch / powerpc / kernel / idle_e500.S
index 267adec..47a1a98 100644 (file)
@@ -47,6 +47,15 @@ BEGIN_FTR_SECTION
        mtlr    r0
        lis     r3,HID0_NAP@h
 END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)
+BEGIN_FTR_SECTION
+       msync
+       li      r7,L2CSR0_L2FL@l
+       mtspr   SPRN_L2CSR0,r7
+2:
+       mfspr   r7,SPRN_L2CSR0
+       andi.   r4,r7,L2CSR0_L2FL@l
+       bne     2b
+END_FTR_SECTION_IFSET(CPU_FTR_L2CSR|CPU_FTR_CAN_NAP)
 1:
        /* Go to NAP or DOZE now */
        mfspr   r4,SPRN_HID0
@@ -75,10 +84,11 @@ _GLOBAL(power_save_ppc32_restore)
        stw     r9,_NIP(r11)            /* make it do a blr */
 
 #ifdef CONFIG_SMP
-       mfspr   r12,SPRN_SPRG3
+       rlwinm  r12,r1,0,0,31-THREAD_SHIFT
        lwz     r11,TI_CPU(r12)         /* get cpu number * 4 */
        slwi    r11,r11,2
 #else
        li      r11,0
 #endif
+
        b       transfer_to_handler_cont