]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
authorKan Liang <kan.liang@linux.intel.com>
Wed, 16 Apr 2025 14:24:24 +0000 (07:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:14 +0000 (07:44 +0200)
commit 96a720db59ab330c8562b2437153faa45dac705f upstream.

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.

Fixes: 210cc5f9db7a ("perf/x86/intel/uncore: Add uncore support for Snow Ridge server")
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
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 <gregkh@linuxfoundation.org>
arch/x86/events/intel/uncore_snbep.c

index d081eb89ba1238f9e32f6ba4ac9c40d6459634d1..913de905d9449b65664edca415e89642d86a82a4 100644 (file)
@@ -4656,28 +4656,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 */ },
 };