* [PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler
@ 2016-11-14 11:59 Akshay Adiga
2016-11-14 21:18 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Akshay Adiga @ 2016-11-14 11:59 UTC (permalink / raw)
To: rjw, viresh.kumar, linux-pm, linux-kernel, linuxppc-dev; +Cc: ego, Akshay Adiga
lpstate_idx remains uninitialized in the case when elapsed_time
is greater than MAX_RAMP_DOWN_TIME. At the end of rampdown
global pstate should be equal to 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>
---
drivers/cpufreq/powernv-cpufreq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index c82304b..c5c5bc3 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -624,6 +624,7 @@ void gpstate_timer_handler(unsigned long data)
if (gpstates->elapsed_time > MAX_RAMP_DOWN_TIME) {
gpstate_idx = pstate_to_idx(freq_data.pstate_id);
+ lpstate_idx = gpstate_idx;
reset_gpstates(policy);
gpstates->highest_lpstate_idx = gpstate_idx;
} else {
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler
2016-11-14 11:59 [PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler Akshay Adiga
@ 2016-11-14 21:18 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-11-14 21:18 UTC (permalink / raw)
To: Akshay Adiga; +Cc: viresh.kumar, linux-pm, linux-kernel, linuxppc-dev, ego
On Monday, November 14, 2016 05:29:27 PM Akshay Adiga wrote:
> lpstate_idx remains uninitialized in the case when elapsed_time
> is greater than MAX_RAMP_DOWN_TIME. At the end of rampdown
> global pstate should be equal to 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>
> ---
> drivers/cpufreq/powernv-cpufreq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> index c82304b..c5c5bc3 100644
> --- a/drivers/cpufreq/powernv-cpufreq.c
> +++ b/drivers/cpufreq/powernv-cpufreq.c
> @@ -624,6 +624,7 @@ void gpstate_timer_handler(unsigned long data)
>
> if (gpstates->elapsed_time > MAX_RAMP_DOWN_TIME) {
> gpstate_idx = pstate_to_idx(freq_data.pstate_id);
> + lpstate_idx = gpstate_idx;
> reset_gpstates(policy);
> gpstates->highest_lpstate_idx = gpstate_idx;
> } else {
>
Applied.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-14 21:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 11:59 [PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler Akshay Adiga
2016-11-14 21:18 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).