aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-02-04 22:16:48 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2019-02-23 22:31:40 +1100
commit7aef376679a428c6b7792fb4ce93364fd02caad4 (patch)
treeb610e5df69930203562bd58d60da1c2d330017d0
parentpowerpc: Use task_stack_page() in current_pt_regs() (diff)
downloadlinux-dev-7aef376679a428c6b7792fb4ce93364fd02caad4.tar.xz
linux-dev-7aef376679a428c6b7792fb4ce93364fd02caad4.zip
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 <christophe.leroy@c-s.fr> [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/idle_6xx.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S
index ff026c9d3cab..d9b6e7e0b5e3 100644
--- a/arch/powerpc/kernel/idle_6xx.S
+++ b/arch/powerpc/kernel/idle_6xx.S
@@ -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