diff options
author | Shilpasri G Bhat <[email protected]> | 2018-01-12 12:43:53 +0530 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2018-01-12 13:44:08 +0100 |
commit | 3fa4680b860bf48b437d6a2c039789c4abe202ae (patch) | |
tree | e50e202b40275ad7b8066bc63311237516cabd98 | |
parent | d8de7a44e11f98f2c2a4c2e12e79ba9ffb839306 (diff) |
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: 09ca4c9b5958 (cpufreq: powernv: Replacing pstate_id with frequency table index)
Reported-by: Alvin Wang <[email protected]>
Signed-off-by: Shilpasri G Bhat <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Cc: 4.8+ <[email protected]> # 4.8+
Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r-- | drivers/cpufreq/powernv-cpufreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 8a4e2ce0804c..29cdec198657 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -337,9 +337,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) { |