summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pasemi/powersave.S
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-11-07 09:26:06 -0600
committerOlof Johansson <olof@lixom.net>2007-12-01 13:03:40 -0600
commit8b32bc03256c82a6a4fcb3c2520b54469b74ec82 (patch)
treedead882774db1a0f6069e6962f85e0c0117eadbb /arch/powerpc/platforms/pasemi/powersave.S
parent0d08a84770cb03aea24268e515342d44df8ea588 (diff)
[POWERPC] pasemi: Don't enter powersaving states from elevated astates
When the PWRficient cpus are entered into powersavings states, the astate is automatically dropped down to 0. While we still restore it when we come out of idle, it can still cause some weird effects with respect to performance (especially since it takes a while to ramp up to higher astates). So, to avoid this, don't enter power savings when the cpufreq driver (or user) has set higher astates than 0. The restore is still required, since there's a chance the astate has been raised from the other cpu while the idling one was asleep. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/powerpc/platforms/pasemi/powersave.S')
-rw-r--r--arch/powerpc/platforms/pasemi/powersave.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pasemi/powersave.S b/arch/powerpc/platforms/pasemi/powersave.S
index 6d0fba6aab1..56f45adcd08 100644
--- a/arch/powerpc/platforms/pasemi/powersave.S
+++ b/arch/powerpc/platforms/pasemi/powersave.S
@@ -62,7 +62,16 @@ sleep_common:
mflr r0
std r0, 16(r1)
stdu r1,-64(r1)
+#ifdef CONFIG_PPC_PASEMI_CPUFREQ
+ std r3, 48(r1)
+ /* Only do power savings when in astate 0 */
+ bl .check_astate
+ cmpwi r3,0
+ bne 1f
+
+ ld r3, 48(r1)
+#endif
LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
mfmsr r4
andc r5,r4,r6
@@ -73,7 +82,7 @@ sleep_common:
mtmsrd r4,0
- addi r1,r1,64
+1: addi r1,r1,64
ld r0,16(r1)
mtlr r0
blr