summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/idle_6xx.S
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-08-26 06:08:56 +0400
committerPaul Mackerras <paulus@samba.org>2008-09-03 14:53:47 +0400
commit7888bc2b4778fda267a6e6422c4497dba865a47a (patch)
tree3cc3039536a510361aaea6031f400b30b8bc6253 /arch/powerpc/kernel/idle_6xx.S
parent94ee815c05c9387931e549d83312d30009ed86e9 (diff)
downloadlinux-7888bc2b4778fda267a6e6422c4497dba865a47a.tar.xz
powerpc: Fix for getting CPU number in power_save_ppc32_restore()
The calculation to get TI_CPU based off of SPRG3 was just plain wrong, meaning that we were getting garbage for the CPU number on 6xx/G3/G4 based SMP boxes in this code. Just offset off the stack pointer (to get to thread_info) like all the other references to TI_CPU do. This was pointed out by Chen Gong <G.Chen@freescale.com> [paulus@samba.org - use rlwinm r12,r11,... instead of rlwinm r12,r1,...; tophys()] Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/idle_6xx.S')
-rw-r--r--arch/powerpc/kernel/idle_6xx.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S
index 019b02d8844f..15c611de1ee2 100644
--- a/arch/powerpc/kernel/idle_6xx.S
+++ b/arch/powerpc/kernel/idle_6xx.S
@@ -158,7 +158,7 @@ _GLOBAL(power_save_ppc32_restore)
stw r9,_NIP(r11) /* make it do a blr */
#ifdef CONFIG_SMP
- mfspr r12,SPRN_SPRG3
+ rlwinm r12,r11,0,0,31-THREAD_SHIFT
lwz r11,TI_CPU(r12) /* get cpu number * 4 */
slwi r11,r11,2
#else