]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Mon, 22 Nov 2021 01:54:52 +0000 (20:54 -0500)
committerSasha Levin <sashal@kernel.org>
Mon, 22 Nov 2021 01:54:52 +0000 (20:54 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/perf-x86-intel-uncore-fix-filter_tid-mask-for-cha-ev.patch [new file with mode: 0644]
queue-4.19/perf-x86-intel-uncore-fix-iio-event-constraints-for-.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/perf-x86-intel-uncore-fix-filter_tid-mask-for-cha-ev.patch b/queue-4.19/perf-x86-intel-uncore-fix-filter_tid-mask-for-cha-ev.patch
new file mode 100644 (file)
index 0000000..9908802
--- /dev/null
@@ -0,0 +1,41 @@
+From 1f21131bc5368ba0b0e246f4091fe33808f6cfb1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 Nov 2021 12:03:32 +0300
+Subject: perf/x86/intel/uncore: Fix filter_tid mask for CHA events on Skylake
+ Server
+
+From: Alexander Antonov <alexander.antonov@linux.intel.com>
+
+[ Upstream commit e324234e0aa881b7841c7c713306403e12b069ff ]
+
+According Uncore Reference Manual: any of the CHA events may be filtered
+by Thread/Core-ID by using tid modifier in CHA Filter 0 Register.
+Update skx_cha_hw_config() to follow Uncore Guide.
+
+Fixes: cd34cd97b7b4 ("perf/x86/intel/uncore: Add Skylake server uncore support")
+Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
+Link: https://lore.kernel.org/r/20211115090334.3789-2-alexander.antonov@linux.intel.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/events/intel/uncore_snbep.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
+index c06074b847fa6..f6f5641c6299a 100644
+--- a/arch/x86/events/intel/uncore_snbep.c
++++ b/arch/x86/events/intel/uncore_snbep.c
+@@ -3416,6 +3416,9 @@ static int skx_cha_hw_config(struct intel_uncore_box *box, struct perf_event *ev
+       struct hw_perf_event_extra *reg1 = &event->hw.extra_reg;
+       struct extra_reg *er;
+       int idx = 0;
++      /* Any of the CHA events may be filtered by Thread/Core-ID.*/
++      if (event->hw.config & SNBEP_CBO_PMON_CTL_TID_EN)
++              idx = SKX_CHA_MSR_PMON_BOX_FILTER_TID;
+       for (er = skx_uncore_cha_extra_regs; er->msr; er++) {
+               if (er->event != (event->hw.config & er->config_mask))
+-- 
+2.33.0
+
diff --git a/queue-4.19/perf-x86-intel-uncore-fix-iio-event-constraints-for-.patch b/queue-4.19/perf-x86-intel-uncore-fix-iio-event-constraints-for-.patch
new file mode 100644 (file)
index 0000000..efc1ab5
--- /dev/null
@@ -0,0 +1,38 @@
+From b5573f31c25ff2e5ccb12be1fa0af6667d3ad384 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 Nov 2021 12:03:33 +0300
+Subject: perf/x86/intel/uncore: Fix IIO event constraints for Skylake Server
+
+From: Alexander Antonov <alexander.antonov@linux.intel.com>
+
+[ Upstream commit 3866ae319c846a612109c008f43cba80b8c15e86 ]
+
+According to the latest uncore document, COMP_BUF_OCCUPANCY (0xd5) event
+can be collected on 2-3 counters. Update uncore IIO event constraints for
+Skylake Server.
+
+Fixes: cd34cd97b7b4 ("perf/x86/intel/uncore: Add Skylake server uncore support")
+Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
+Link: https://lore.kernel.org/r/20211115090334.3789-3-alexander.antonov@linux.intel.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/events/intel/uncore_snbep.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
+index f6f5641c6299a..2bf1170f7afdb 100644
+--- a/arch/x86/events/intel/uncore_snbep.c
++++ b/arch/x86/events/intel/uncore_snbep.c
+@@ -3486,6 +3486,7 @@ static struct event_constraint skx_uncore_iio_constraints[] = {
+       UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
+       UNCORE_EVENT_CONSTRAINT(0xc5, 0xc),
+       UNCORE_EVENT_CONSTRAINT(0xd4, 0xc),
++      UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
+       EVENT_CONSTRAINT_END
+ };
+-- 
+2.33.0
+
index 4c930db2f7cee6ba6d50ffe6a997e5196f181313..f0b05f0d9725ddd176f0f0cdd29b84b49197b79e 100644 (file)
@@ -299,3 +299,5 @@ i40e-fix-display-error-code-in-dmesg.patch
 nfc-reorganize-the-functions-in-nci_request.patch
 nfc-reorder-the-logic-in-nfc_-un-register_device.patch
 perf-bench-fix-two-memory-leaks-detected-with-asan.patch
+perf-x86-intel-uncore-fix-filter_tid-mask-for-cha-ev.patch
+perf-x86-intel-uncore-fix-iio-event-constraints-for-.patch