summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pasemi/cpufreq.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-11-07 15:26:06 (GMT)
committerOlof Johansson <olof@lixom.net>2007-12-01 19:03:40 (GMT)
commit8b32bc03256c82a6a4fcb3c2520b54469b74ec82 (patch)
treedead882774db1a0f6069e6962f85e0c0117eadbb /arch/powerpc/platforms/pasemi/cpufreq.c
parent0d08a84770cb03aea24268e515342d44df8ea588 (diff)
downloadlinux-fsl-qoriq-8b32bc03256c82a6a4fcb3c2520b54469b74ec82.tar.xz
[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/cpufreq.c')
-rw-r--r--arch/powerpc/platforms/pasemi/cpufreq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c
index 8caa166..58556b0 100644
--- a/arch/powerpc/platforms/pasemi/cpufreq.c
+++ b/arch/powerpc/platforms/pasemi/cpufreq.c
@@ -32,6 +32,7 @@
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/time.h>
+#include <asm/smp.h>
#define SDCASR_REG 0x0100
#define SDCASR_REG_STRIDE 0x1000
@@ -124,6 +125,11 @@ static void set_astate(int cpu, unsigned int astate)
local_irq_restore(flags);
}
+int check_astate(void)
+{
+ return get_cur_astate(hard_smp_processor_id());
+}
+
void restore_astate(int cpu)
{
set_astate(cpu, current_astate);