From b78125ff1cdf7dc507312e301e2bf16a655ed27a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 25 Apr 2025 10:15:57 +0200 Subject: [PATCH] 5.10-stable patches added patches: perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-icx.patch --- ...-of-iio-free-running-counters-on-icx.patch | 76 +++++++++++++++++++ ...-of-iio-free-running-counters-on-snr.patch | 3 +- queue-5.10/series | 1 + 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-icx.patch diff --git a/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-icx.patch b/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-icx.patch new file mode 100644 index 0000000000..fe6306225e --- /dev/null +++ b/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-icx.patch @@ -0,0 +1,76 @@ +From 32c7f1150225694d95a51110a93be25db03bb5db Mon Sep 17 00:00:00 2001 +From: Kan Liang +Date: Wed, 16 Apr 2025 07:24:25 -0700 +Subject: perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX + +From: Kan Liang + +commit 32c7f1150225694d95a51110a93be25db03bb5db upstream. + +There was a mistake in the ICX uncore spec too. The counter increments +for every 32 bytes rather than 4 bytes. + +The same as SNR, there are 1 ioclk and 8 IIO bandwidth in free running +counters. Reuse the snr_uncore_iio_freerunning_events(). + +Fixes: 2b3b76b5ec67 ("perf/x86/intel/uncore: Add Ice Lake server uncore support") +Reported-by: Tang Jun +Signed-off-by: Kan Liang +Signed-off-by: Ingo Molnar +Acked-by: Peter Zijlstra +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20250416142426.3933977-2-kan.liang@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/events/intel/uncore_snbep.c | 33 +-------------------------------- + 1 file changed, 1 insertion(+), 32 deletions(-) + +--- a/arch/x86/events/intel/uncore_snbep.c ++++ b/arch/x86/events/intel/uncore_snbep.c +@@ -5013,37 +5013,6 @@ static struct freerunning_counters icx_i + [ICX_IIO_MSR_BW_IN] = { 0xaa0, 0x1, 0x10, 8, 48, icx_iio_bw_freerunning_box_offsets }, + }; + +-static struct uncore_event_desc icx_uncore_iio_freerunning_events[] = { +- /* Free-Running IIO CLOCKS Counter */ +- INTEL_UNCORE_EVENT_DESC(ioclk, "event=0xff,umask=0x10"), +- /* Free-Running IIO BANDWIDTH IN Counters */ +- INTEL_UNCORE_EVENT_DESC(bw_in_port0, "event=0xff,umask=0x20"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port0.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port0.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port1, "event=0xff,umask=0x21"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port1.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port1.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port2, "event=0xff,umask=0x22"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port2.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port2.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port3, "event=0xff,umask=0x23"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port3.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port3.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port4, "event=0xff,umask=0x24"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port4.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port4.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port5, "event=0xff,umask=0x25"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port5.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port5.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port6, "event=0xff,umask=0x26"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port6.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port6.unit, "MiB"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port7, "event=0xff,umask=0x27"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port7.scale, "3.814697266e-6"), +- INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"), +- { /* end: all zeroes */ }, +-}; +- + static struct intel_uncore_type icx_uncore_iio_free_running = { + .name = "iio_free_running", + .num_counters = 9, +@@ -5051,7 +5020,7 @@ static struct intel_uncore_type icx_unco + .num_freerunning_types = ICX_IIO_FREERUNNING_TYPE_MAX, + .freerunning = icx_iio_freerunning, + .ops = &skx_uncore_iio_freerunning_ops, +- .event_descs = icx_uncore_iio_freerunning_events, ++ .event_descs = snr_uncore_iio_freerunning_events, + .format_group = &skx_uncore_iio_freerunning_format_group, + }; + diff --git a/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch b/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch index 5671a7c893..1487fd96f2 100644 --- a/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch +++ b/queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch @@ -26,13 +26,14 @@ Acked-by: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250416142426.3933977-1-kan.liang@linux.intel.com Signed-off-by: Greg Kroah-Hartman + --- arch/x86/events/intel/uncore_snbep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c -@@ -5018,28 +5018,28 @@ static struct uncore_event_desc icx_unco +@@ -4487,28 +4487,28 @@ static struct uncore_event_desc snr_unco INTEL_UNCORE_EVENT_DESC(ioclk, "event=0xff,umask=0x10"), /* Free-Running IIO BANDWIDTH IN Counters */ INTEL_UNCORE_EVENT_DESC(bw_in_port0, "event=0xff,umask=0x20"), diff --git a/queue-5.10/series b/queue-5.10/series index 6aec8ff766..cbc17e1151 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -133,6 +133,7 @@ tracing-fix-filter-string-testing.patch virtiofs-add-filesystem-context-source-name-check.patch perf-x86-intel-allow-to-update-user-space-gprs-from-pebs-records.patch perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch +perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-icx.patch drm-repaper-fix-integer-overflows-in-repeat-functions.patch drm-amd-pm-powerplay-prevent-division-by-zero.patch drm-amd-pm-powerplay-hwmgr-smu7_thermal-prevent-division-by-zero.patch -- 2.47.3