Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:10 +0200
commit8ac25894b95d88c22b7b9422e0de61dd956525d3 (patch)
treed0ff65f8ba19f365052e17241318de16fe58a35e
parentb645a6fd9fcb94c244e2d0ac937b2755717f94af (diff)
perf/x86/intel: Fix SLOTS PEBS event constraint (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.9-112-perf-x86-intel-Fix-SLOTS-PEBS-event-constraint.patch47
-rw-r--r--series.conf1
2 files changed, 48 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-112-perf-x86-intel-Fix-SLOTS-PEBS-event-constraint.patch b/patches.kernel.org/5.2.9-112-perf-x86-intel-Fix-SLOTS-PEBS-event-constraint.patch
new file mode 100644
index 0000000000..3c1ac8ccf5
--- /dev/null
+++ b/patches.kernel.org/5.2.9-112-perf-x86-intel-Fix-SLOTS-PEBS-event-constraint.patch
@@ -0,0 +1,47 @@
+From: Kan Liang <kan.liang@linux.intel.com>
+Date: Tue, 23 Jul 2019 13:04:29 -0700
+Subject: [PATCH] perf/x86/intel: Fix SLOTS PEBS event constraint
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: 3d0c3953601d250175c7684ec0d9df612061dae5
+
+[ Upstream commit 3d0c3953601d250175c7684ec0d9df612061dae5 ]
+
+Sampling SLOTS event and ref-cycles event in a group on Icelake gives
+EINVAL.
+
+SLOTS event is the event stands for the fixed counter 3, not fixed
+counter 2. Wrong mask was set to SLOTS event in
+intel_icl_pebs_event_constraints[].
+
+Reported-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support")
+Link: https://lkml.kernel.org/r/20190723200429.8180-1-kan.liang@linux.intel.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/events/intel/ds.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
+index 505c73dc6a73..6601b8759c92 100644
+--- a/arch/x86/events/intel/ds.c
++++ b/arch/x86/events/intel/ds.c
+@@ -851,7 +851,7 @@ struct event_constraint intel_skl_pebs_event_constraints[] = {
+
+ struct event_constraint intel_icl_pebs_event_constraints[] = {
+ INTEL_FLAGS_UEVENT_CONSTRAINT(0x1c0, 0x100000000ULL), /* INST_RETIRED.PREC_DIST */
+- INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x400000000ULL), /* SLOTS */
++ INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x800000000ULL), /* SLOTS */
+
+ INTEL_PLD_CONSTRAINT(0x1cd, 0xff), /* MEM_TRANS_RETIRED.LOAD_LATENCY */
+ INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x1d0, 0xf), /* MEM_INST_RETIRED.LOAD */
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index 58af4e93b6..04b5a8744a 100644
--- a/series.conf
+++ b/series.conf
@@ -1132,6 +1132,7 @@
patches.kernel.org/5.2.9-109-scsi-scsi_dh_alua-always-use-a-2-second-delay-b.patch
patches.kernel.org/5.2.9-110-test_firmware-fix-a-memory-leak-bug.patch
patches.kernel.org/5.2.9-111-tty-ldsem-locking-rwsem-Add-missing-ACQUIRE-to-.patch
+ patches.kernel.org/5.2.9-112-perf-x86-intel-Fix-SLOTS-PEBS-event-constraint.patch
########################################################
# Build fixes that apply to the vanilla kernel too.