]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix for getting CPU number in power_save_ppc32_restore()
authorKumar Gala <galak@kernel.crashing.org>
Tue, 26 Aug 2008 02:08:56 +0000 (12:08 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Sep 2008 10:53:47 +0000 (20:53 +1000)
commit9b32e07060f1dcb91cc010756bb01ad542f844c3
tree3cc3039536a510361aaea6031f400b30b8bc6253
parent3376d753bc49653c288b54bac05fe5a0205231ad
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>
arch/powerpc/kernel/idle_6xx.S
arch/powerpc/kernel/idle_e500.S