mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf/x86/amd/uncore: Extend num_umc_pmc to fix UMC discovery
@ 2026-10-07 15:27 Sandipan Das
  0 siblings, 0 replies; only message in thread
From: Sandipan Das @ 2026-10-07 15:27 UTC (permalink / raw)
  To: linux-perf-users, linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, James Clark, Thomas Gleixner,
	Borislav Petkov, Dave Hansen, x86, H . Peter Anvin,
	Ravi Bangoria, Ananth Narayan, Sandipan Das

The number of Unified Memory Controller (UMC) counters is advertised by
CPUID 0x80000022[EBX].NumPerfCtrUmc which corresponds to num_umc_pmc.
NumPerfCtrUmc was introduced in Zen 4 with a width of six bits (21:16)
but Zen 5 documentation revised it to eight bits (23:16).

No issues were observed thus far because the maximum possible count,
which depends on the maximum number of UMCs across the product lineup,
remained the same as that of Zen 4. Six bits were still enough to
accommodate the value. However, Zen 6 can have values as high as 64 in
fully-populated configurations and run into discovery issues since the
two most significant bits are ignored. Fix this by extending the size
of the bitfield to eight bits.

For Zen 4 processors, the two most significant bits that documentation
flags as reserved, are guaranteed to be zero.

Fixes: 25e56847821f ("perf/x86/amd/uncore: Add memory controller support")
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
---
 arch/x86/include/asm/perf_event.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index 5c92d43bbef8..18b8b0c0c5e3 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -298,7 +298,7 @@ union cpuid_0x80000022_ebx {
 		/* Number of Data Fabric Counters */
 		unsigned int	num_df_pmc:6;
 		/* Number of Unified Memory Controller Counters */
-		unsigned int	num_umc_pmc:6;
+		unsigned int	num_umc_pmc:8;
 	} split;
 	unsigned int		full;
 };
-- 
2.53.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-07 15:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 15:27 [PATCH] perf/x86/amd/uncore: Extend num_umc_pmc to fix UMC discovery Sandipan Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®