Skip to content

Commit 8e56a93

Browse files
shilpasrigregkh
authored andcommitted
cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin
commit 3fa4680 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 75a3f11 commit 8e56a93

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/cpufreq/powernv-cpufreq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ static int init_powernv_pstates(void)
287287

288288
if (id == pstate_max)
289289
powernv_pstate_info.max = i;
290-
else if (id == pstate_nominal)
290+
if (id == pstate_nominal)
291291
powernv_pstate_info.nominal = i;
292-
else if (id == pstate_min)
292+
if (id == pstate_min)
293293
powernv_pstate_info.min = i;
294294

295295
if (powernv_pstate_info.wof_enabled && id == pstate_turbo) {

0 commit comments

Comments
 (0)