Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2018-08-03 02:42:06 +0200
committerTony Jones <tonyj@suse.de>2018-08-03 02:43:49 +0200
commit9fb5cd33092b42220d2ee9a920965f056b8afa40 (patch)
treea52b9d4104e618ad4f33ff1afc6a4a27f7600f71
parent9a1e6889e352e9a9e9790af5c8aa9b98cc728f36 (diff)
perf/x86/intel/uncore: Add event constraint for BDX PCU
(bsc#1087202).
-rw-r--r--patches.fixes/perf-x86-intel-uncore-add-event-constraint-for-bdx-pcu.patch50
-rw-r--r--series.conf1
2 files changed, 51 insertions, 0 deletions
diff --git a/patches.fixes/perf-x86-intel-uncore-add-event-constraint-for-bdx-pcu.patch b/patches.fixes/perf-x86-intel-uncore-add-event-constraint-for-bdx-pcu.patch
new file mode 100644
index 0000000000..619670dbf5
--- /dev/null
+++ b/patches.fixes/perf-x86-intel-uncore-add-event-constraint-for-bdx-pcu.patch
@@ -0,0 +1,50 @@
+From: Kan Liang <kan.liang@intel.com>
+Date: Tue, 14 Nov 2017 06:06:40 -0800
+Subject: perf/x86/intel/uncore: Add event constraint for BDX PCU
+Git-commit: bb9fbe1b57503f790dbbf9f06e72cb0fb9e60740
+Patch-mainline: v4.15-rc1
+References: bsc#1087202
+
+Event select bit 7 'Use Occupancy' in PCU Box is not available for
+counter 0 on BDX
+
+Add a constraint to fix it.
+
+Reported-by: Stephane Eranian <eranian@google.com>
+Signed-off-by: Kan Liang <kan.liang@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Tested-by: Stephane Eranian <eranian@google.com>
+Cc: peterz@infradead.org
+Cc: ak@linux.intel.com
+Link: https://lkml.kernel.org/r/1510668400-301000-1-git-send-email-kan.liang@intel.com
+
+Signed-off-by: Tony Jones <tonyj@suse.de>
+---
+ arch/x86/events/intel/uncore_snbep.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
+index 95cb19f4e06f..f4e4168455a8 100644
+--- a/arch/x86/events/intel/uncore_snbep.c
++++ b/arch/x86/events/intel/uncore_snbep.c
+@@ -3035,11 +3035,19 @@ static struct intel_uncore_type *bdx_msr_uncores[] = {
+ NULL,
+ };
+
++/* Bit 7 'Use Occupancy' is not available for counter 0 on BDX */
++static struct event_constraint bdx_uncore_pcu_constraints[] = {
++ EVENT_CONSTRAINT(0x80, 0xe, 0x80),
++ EVENT_CONSTRAINT_END
++};
++
+ void bdx_uncore_cpu_init(void)
+ {
+ if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
+ bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
+ uncore_msr_uncores = bdx_msr_uncores;
++
++ hswep_uncore_pcu.constraints = bdx_uncore_pcu_constraints;
+ }
+
+ static struct intel_uncore_type bdx_uncore_ha = {
+
diff --git a/series.conf b/series.conf
index 36721980ec..9c2f8f5e72 100644
--- a/series.conf
+++ b/series.conf
@@ -9764,6 +9764,7 @@
patches.suse/0001-objtool-Move-synced-files-to-their-original-relative.patch
patches.suse/0002-objtool-Move-kernel-headers-code-sync-check-to-a-scr.patch
patches.suse/objtool-Fix-cross-build.patch
+ patches.fixes/perf-x86-intel-uncore-add-event-constraint-for-bdx-pcu.patch
patches.arch/x86-acpi-handle-sci-interrupts-above-legacy-space-gracefully.patch
patches.arch/x86-acpi-reduce-code-duplication-in-mp_override_legacy_irq.patch
patches.arch/x86-topology-avoid-wasting-128k-for-package-id-array.patch