]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 22:37:39 +0000 (14:37 -0800)
commita7e19859f9fd6eb9e5a11e5645fe42082df40d8a
tree622993edc5dd8ecc465d117a8bd650b357432fbd
parent784e618742264266c0501cf5db0c9244d7359cff
cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)

commit 8e601a9f97a00bab031980de34f9a81891c1f82f upstream.

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: b34ef932d79a (intel_pstate: Knights Landing support)
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/intel_pstate.c