Skip to content

Commit

Permalink
cpufreq: powernv: Dont assume distinct pstate values for nominal and …
Browse files Browse the repository at this point in the history
…pmin

Some OpenPOWER boxes can have same pstate values for nominal and
pmin pstates. In these boxes the current code will not initialize
'powernv_pstate_info.min' variable and result in erroneous CPU
frequency reporting. This patch fixes this problem.

Fixes: 09ca4c9 (cpufreq: powernv: Replacing pstate_id with frequency table index)
Reported-by: Alvin Wang <wangat@tw.ibm.com>
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 4.8+ <stable@vger.kernel.org> # 4.8+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Shilpasri G Bhat authored and Rafael J. Wysocki committed Jan 12, 2018
1 parent d8de7a4 commit 3fa4680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/cpufreq/powernv-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ static int init_powernv_pstates(void)

if (id == pstate_max)
powernv_pstate_info.max = i;
else if (id == pstate_nominal)
if (id == pstate_nominal)
powernv_pstate_info.nominal = i;
else if (id == pstate_min)
if (id == pstate_min)
powernv_pstate_info.min = i;

if (powernv_pstate_info.wof_enabled && id == pstate_turbo) {
Expand Down

0 comments on commit 3fa4680

Please sign in to comment.