]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 15 Oct 2015 19:34:21 +0000 (12:34 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Oct 2015 20:46:33 +0000 (22:46 +0200)
commit359673391348f2a4b0a38fceaba35f2ac2c838c8
tree9116b294513ac173b61dffe4c8daa05802072d68
parentd4b7198c826c2623452ec881d49138c5c732e01c
cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)

This is a workaround for KNL platform, where in some cases MPERF counter
will not have updated value before next read of MSR_IA32_MPERF. In this
case divide by zero will occur. This change ignores current sample for
busy calculation in this case.

Fixes: 1e399baf9c9e (intel_pstate: Knights Landing support)
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Cc: 4.1+ <stable@vger.kernel.org> # 4.1+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c