Commit 3fa4680b authored by Shilpasri G Bhat's avatar Shilpasri G Bhat Committed by Rafael J. Wysocki

cpufreq: powernv: Dont assume distinct pstate values for nominal and 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: 09ca4c9b (cpufreq: powernv: Replacing pstate_id with frequency table index)
Reported-by: default avatarAlvin Wang <wangat@tw.ibm.com>
Signed-off-by: default avatarShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Cc: 4.8+ <stable@vger.kernel.org> # 4.8+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d8de7a44
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment