* Patch "cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)" has been added to the 4.1-stable tree
@ 2015-11-06 6:58 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-11-06 6:58 UTC (permalink / raw)
To: srinivas.pandruvada, gregkh, kristen, rafael.j.wysocki
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
cpufreq-intel_pstate-fix-divide-by-zero-on-knights-landing-knl.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8e601a9f97a00bab031980de34f9a81891c1f82f Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu, 15 Oct 2015 12:34:21 -0700
Subject: cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
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 | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -761,6 +761,11 @@ static inline void intel_pstate_sample(s
local_irq_save(flags);
rdmsrl(MSR_IA32_APERF, aperf);
rdmsrl(MSR_IA32_MPERF, mperf);
+ if (cpu->prev_mperf == mperf) {
+ local_irq_restore(flags);
+ return;
+ }
+
local_irq_restore(flags);
cpu->last_sample_time = cpu->sample.time;
Patches currently in stable-queue which might be from srinivas.pandruvada@linux.intel.com are
queue-4.1/cpufreq-intel_pstate-fix-divide-by-zero-on-knights-landing-knl.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-06 6:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 6:58 Patch "cpufreq: intel_pstate: Fix divide by zero on Knights Landing (KNL)" has been added to the 4.1-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).