Skip to content

Commit 7aef376

Browse files
chleroympe
authored andcommitted
powerpc/idle/6xx: Use r1 with CURRENT_THREAD_INFO()
Make sure CURRENT_THREAD_INFO() is used with r1 which is the virtual address of the stack, in order to ease the switch to r2 when we enable THREAD_INFO_IN_TASK, as we have no register having the phys address of current. Signed-off-by: Christophe Leroy <[email protected]> [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman <[email protected]>
1 parent b72cc2e commit 7aef376

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/powerpc/kernel/idle_6xx.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ _GLOBAL(power_save_ppc32_restore)
159159
stw r9,_NIP(r11) /* make it do a blr */
160160

161161
#ifdef CONFIG_SMP
162-
CURRENT_THREAD_INFO(r12, r11)
162+
CURRENT_THREAD_INFO(r12, r1)
163+
tophys(r12, r12)
163164
lwz r11,TI_CPU(r12) /* get cpu number * 4 */
164165
slwi r11,r11,2
165166
#else

0 commit comments

Comments
 (0)