diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2012-02-05 13:18:44 +0530 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-02-14 10:59:26 -0800 |
commit | 03e4fd6eb25e6b46536ecdb0d1b7d33d46b15480 (patch) | |
tree | 9a8bf5242d196fee7968d763b71ed5184b626b3a /arch | |
parent | 6369fd41fc6075a547394d95608ca7ff0e878698 (diff) | |
download | blackbird-op-linux-03e4fd6eb25e6b46536ecdb0d1b7d33d46b15480.tar.gz blackbird-op-linux-03e4fd6eb25e6b46536ecdb0d1b7d33d46b15480.zip |
ARM: OMAP4: cpuidle: Fix the C-state reporting to cpuidle governor.
OMAP4 cpuidle driver is reporting the state requested by governor
rather than the actually attempted one.
This is obviously misleading sysfs and powertop cpuidle statistics.
Fix it so that stats are reported correctly.
Reported-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
[khilman@ti.com: minor changelog edits]
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/cpuidle44xx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index cfdbb86bc84e..72e018b9b260 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -65,7 +65,6 @@ static int omap4_enter_idle(struct cpuidle_device *dev, struct timespec ts_preidle, ts_postidle, ts_idle; u32 cpu1_state; int idle_time; - int new_state_idx; int cpu_id = smp_processor_id(); /* Used to keep track of the total time in idle */ @@ -84,8 +83,8 @@ static int omap4_enter_idle(struct cpuidle_device *dev, */ cpu1_state = pwrdm_read_pwrst(cpu1_pd); if (cpu1_state != PWRDM_POWER_OFF) { - new_state_idx = drv->safe_state_index; - cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]); + index = drv->safe_state_index; + cx = cpuidle_get_statedata(&dev->states_usage[index]); } if (index > 0) |