From: Sasha Levin Date: Mon, 22 Nov 2021 01:54:52 +0000 (-0500) Subject: Fixes for 4.19 X-Git-Tag: v5.15.5~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=637c29088d5db6b1ab0ec20d683bff4dd6d6ce68;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- 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 index 00000000000..9908802925d --- /dev/null +++ b/queue-4.19/perf-x86-intel-uncore-fix-filter_tid-mask-for-cha-ev.patch @@ -0,0 +1,41 @@ +From 1f21131bc5368ba0b0e246f4091fe33808f6cfb1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Signed-off-by: Peter Zijlstra (Intel) +Reviewed-by: Kan Liang +Link: https://lore.kernel.org/r/20211115090334.3789-2-alexander.antonov@linux.intel.com +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..efc1ab5cdb0 --- /dev/null +++ b/queue-4.19/perf-x86-intel-uncore-fix-iio-event-constraints-for-.patch @@ -0,0 +1,38 @@ +From b5573f31c25ff2e5ccb12be1fa0af6667d3ad384 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 15 Nov 2021 12:03:33 +0300 +Subject: perf/x86/intel/uncore: Fix IIO event constraints for Skylake Server + +From: Alexander Antonov + +[ 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 +Signed-off-by: Peter Zijlstra (Intel) +Reviewed-by: Kan Liang +Link: https://lore.kernel.org/r/20211115090334.3789-3-alexander.antonov@linux.intel.com +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-4.19/series b/queue-4.19/series index 4c930db2f7c..f0b05f0d972 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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