Skip to content

Commit

Permalink
powerpc/idle/6xx: Use r1 with CURRENT_THREAD_INFO()
Browse files Browse the repository at this point in the history
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 <christophe.leroy@c-s.fr>
[mpe: Split out of larger patch]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Feb 23, 2019
1 parent b72cc2e commit 7aef376
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/kernel/idle_6xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ _GLOBAL(power_save_ppc32_restore)
stw r9,_NIP(r11) /* make it do a blr */

#ifdef CONFIG_SMP
CURRENT_THREAD_INFO(r12, r11)
CURRENT_THREAD_INFO(r12, r1)
tophys(r12, r12)
lwz r11,TI_CPU(r12) /* get cpu number * 4 */
slwi r11,r11,2
#else
Expand Down

0 comments on commit 7aef376

Please sign in to comment.