diff options
author | Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> | 2016-11-14 06:59:27 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-11-14 15:32:31 -0500 |
commit | c9a81e6864d48f81797397bbd65d299bf20c6148 (patch) | |
tree | 6a0c091f2d23f42574fa25146c66efb08b96747c | |
parent | 7f7a516ee30a931fa2d257b39f5ef7b9196c56fc (diff) |
cpufreq: powernv: Fix uninitialized lpstate_idx in gpstates_timer_handler()
lpstate_idx remains uninitialized in the case when elapsed_time
is greater than MAX_RAMP_DOWN_TIME. At the end of rampdown the
global pstate should be equal to the local pstate.
Fixes: 20b15b766354 (cpufreq: powernv: Use PMCR to verify global and localpstate)
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/powernv-cpufreq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index c82304b7a4c0..c5c5bc35eece 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c | |||
@@ -624,6 +624,7 @@ void gpstate_timer_handler(unsigned long data) | |||
624 | 624 | ||
625 | if (gpstates->elapsed_time > MAX_RAMP_DOWN_TIME) { | 625 | if (gpstates->elapsed_time > MAX_RAMP_DOWN_TIME) { |
626 | gpstate_idx = pstate_to_idx(freq_data.pstate_id); | 626 | gpstate_idx = pstate_to_idx(freq_data.pstate_id); |
627 | lpstate_idx = gpstate_idx; | ||
627 | reset_gpstates(policy); | 628 | reset_gpstates(policy); |
628 | gpstates->highest_lpstate_idx = gpstate_idx; | 629 | gpstates->highest_lpstate_idx = gpstate_idx; |
629 | } else { | 630 | } else { |