Skip to content
Commit 82696471 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Greg Kroah-Hartman
Browse files

cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)

commit 8e601a9f 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: b34ef932

 (intel_pstate: Knights Landing support)
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: default avatarKristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a52c0e0
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