perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
PATCH 1/1 perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
From: Kan Liang <[email protected]>
[ Upstream commit 96a720db59ab330c8562b2437153faa45dac705f ]
(The existing patch in queue-5.10 was wrong. queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch It's supposed to change the array snr_uncore_iio_freerunning_events[] rather than icx_uncore_iio_freerunning_events[]. Send the patch to
replace the wrong one.
With this fix the https://lore.kernel.org/stable/2025042139-protector-rickety-a72d@gregkh/
can be applied then.)
There was a mistake in the SNR uncore spec. The counter increments for every 32 bytes of data sent from the IO agent to the SOC, not 4 bytes which was documented in the spec.
The event list has been updated:
"EventName": "UNC_IIO_BANDWIDTH_IN.PART0_FREERUN", "BriefDescription": "Free running counter that increments for every 32
bytes of data sent from the IO agent to the SOC",
Update the scale of the IIO bandwidth in free running counters as well.
--- arch/x86/events/intel/uncore_snbep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/events/intel/uncore_snbep.c +8 -8
@@ -4487,28 +4487,28 @@ static struct uncore_event_desc snr_uncore_iio_freerunning_events[] = {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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ),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.scale,"3.0517578125e-5" ), INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"), { /* end: all zeroes */ }, };
Signature · 1 line
2.38.1
Sasha Levin
maintainer[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: 96a720db59ab330c8562b2437153faa45dac705f
WARNING: Author mismatch between patch and upstream commit:
Backport author: [email protected]
Commit author: Kan Liang<[email protected]>
Status in newer kernel trees:
6.14.y | Present (different SHA1: 389ee3afddf6) 6.12.y | Present (different SHA1: 8d19c4a3b811) 6.6.y | Present (different SHA1: aea923afeae4) 6.1.y | Present (different SHA1: 8a809a8bcb89) 5.15.y | Present (different SHA1: 95ee595e4dfd)
Note: The patch differs from the upstream commit:
---
1: 96a720db59ab3 ! 1: 0a7c40d042397 perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
@@ Metadata
## Commit message ##
perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
+ [ Upstream commit 96a720db59ab330c8562b2437153faa45dac705f ]
+
+ (The existing patch in queue-5.10 was wrong.
+ queue-5.10/perf-x86-intel-uncore-fix-the-scale-of-iio-free-running-counters-on-snr.patch
+ It's supposed to change the array snr_uncore_iio_freerunning_events[]
+ rather than icx_uncore_iio_freerunning_events[]. Send the patch to
+ replace the wrong one.
+ With this fix the https://lore.kernel.org/stable/2025042139-protector-rickety-a72d@gregkh/
+ can be applied then.)
+
There was a mistake in the SNR uncore spec. The counter increments for every 32 bytes of data sent from the IO agent to the SOC, not 4 bytes which was documented in the spec.
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.10.y | Success | Success |