Skip to content

Commit adb0ee0

Browse files
Kan Liangvijay-suman
authored andcommitted
perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
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: 2b3b76b ("perf/x86/intel/uncore: Add Ice Lake server uncore support") Reported-by: Tang Jun <[email protected]> Signed-off-by: Kan Liang <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 93c5be4da0975015f3eeb30ec989a610bd8b1fe4) Signed-off-by: Vijayendra Suman <[email protected]>
1 parent 3db01d7 commit adb0ee0

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

arch/x86/events/intel/uncore_snbep.c

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5479,45 +5479,14 @@ static struct freerunning_counters icx_iio_freerunning[] = {
54795479
[ICX_IIO_MSR_BW_IN] = { 0xaa0, 0x1, 0x10, 8, 48, icx_iio_bw_freerunning_box_offsets },
54805480
};
54815481

5482-
static struct uncore_event_desc icx_uncore_iio_freerunning_events[] = {
5483-
/* Free-Running IIO CLOCKS Counter */
5484-
INTEL_UNCORE_EVENT_DESC(ioclk, "event=0xff,umask=0x10"),
5485-
/* Free-Running IIO BANDWIDTH IN Counters */
5486-
INTEL_UNCORE_EVENT_DESC(bw_in_port0, "event=0xff,umask=0x20"),
5487-
INTEL_UNCORE_EVENT_DESC(bw_in_port0.scale, "3.814697266e-6"),
5488-
INTEL_UNCORE_EVENT_DESC(bw_in_port0.unit, "MiB"),
5489-
INTEL_UNCORE_EVENT_DESC(bw_in_port1, "event=0xff,umask=0x21"),
5490-
INTEL_UNCORE_EVENT_DESC(bw_in_port1.scale, "3.814697266e-6"),
5491-
INTEL_UNCORE_EVENT_DESC(bw_in_port1.unit, "MiB"),
5492-
INTEL_UNCORE_EVENT_DESC(bw_in_port2, "event=0xff,umask=0x22"),
5493-
INTEL_UNCORE_EVENT_DESC(bw_in_port2.scale, "3.814697266e-6"),
5494-
INTEL_UNCORE_EVENT_DESC(bw_in_port2.unit, "MiB"),
5495-
INTEL_UNCORE_EVENT_DESC(bw_in_port3, "event=0xff,umask=0x23"),
5496-
INTEL_UNCORE_EVENT_DESC(bw_in_port3.scale, "3.814697266e-6"),
5497-
INTEL_UNCORE_EVENT_DESC(bw_in_port3.unit, "MiB"),
5498-
INTEL_UNCORE_EVENT_DESC(bw_in_port4, "event=0xff,umask=0x24"),
5499-
INTEL_UNCORE_EVENT_DESC(bw_in_port4.scale, "3.814697266e-6"),
5500-
INTEL_UNCORE_EVENT_DESC(bw_in_port4.unit, "MiB"),
5501-
INTEL_UNCORE_EVENT_DESC(bw_in_port5, "event=0xff,umask=0x25"),
5502-
INTEL_UNCORE_EVENT_DESC(bw_in_port5.scale, "3.814697266e-6"),
5503-
INTEL_UNCORE_EVENT_DESC(bw_in_port5.unit, "MiB"),
5504-
INTEL_UNCORE_EVENT_DESC(bw_in_port6, "event=0xff,umask=0x26"),
5505-
INTEL_UNCORE_EVENT_DESC(bw_in_port6.scale, "3.814697266e-6"),
5506-
INTEL_UNCORE_EVENT_DESC(bw_in_port6.unit, "MiB"),
5507-
INTEL_UNCORE_EVENT_DESC(bw_in_port7, "event=0xff,umask=0x27"),
5508-
INTEL_UNCORE_EVENT_DESC(bw_in_port7.scale, "3.814697266e-6"),
5509-
INTEL_UNCORE_EVENT_DESC(bw_in_port7.unit, "MiB"),
5510-
{ /* end: all zeroes */ },
5511-
};
5512-
55135482
static struct intel_uncore_type icx_uncore_iio_free_running = {
55145483
.name = "iio_free_running",
55155484
.num_counters = 9,
55165485
.num_boxes = 6,
55175486
.num_freerunning_types = ICX_IIO_FREERUNNING_TYPE_MAX,
55185487
.freerunning = icx_iio_freerunning,
55195488
.ops = &skx_uncore_iio_freerunning_ops,
5520-
.event_descs = icx_uncore_iio_freerunning_events,
5489+
.event_descs = snr_uncore_iio_freerunning_events,
55215490
.format_group = &skx_uncore_iio_freerunning_format_group,
55225491
};
55235492

0 commit comments

Comments
 (0)