cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin

commit 3fa4680b86 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: 09ca4c9b59 (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>
This commit is contained in:
Shilpasri G Bhat 2018-01-12 12:43:53 +05:30 коммит произвёл Greg Kroah-Hartman
Родитель 75a3f11c7b
Коммит 8e56a935a4
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -287,9 +287,9 @@ next:
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) {