summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorSandipan Das <sandipan.das@amd.com>2022-05-19 12:03:32 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-06-13 10:15:13 +0200
commit16b48c3f5ed85b8017526b1acacf5115461b489a (patch)
treebae03b254bc94f8ce48f65ebe6ffd033c8684cf0 /arch/x86/include/asm
parentperf/x86/amd/uncore: Use attr_update for format attributes (diff)
downloadlinux-16b48c3f5ed85b8017526b1acacf5115461b489a.tar.xz
linux-16b48c3f5ed85b8017526b1acacf5115461b489a.zip
perf/x86/amd/uncore: Detect available DF counters
If AMD Performance Monitoring Version 2 (PerfMonV2) is supported, use CPUID leaf 0x80000022 EBX to detect the number of Data Fabric (DF) PMCs. This offers more flexibility if the counts change in later processor families. Signed-off-by: Sandipan Das <sandipan.das@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/bac7b2806561e03f2acc7fdc9db94f102df80e1d.1652954372.git.sandipan.das@amd.com
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/perf_event.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index 409725e86f42..af157aa74f4e 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -194,6 +194,9 @@ union cpuid_0x80000022_ebx {
struct {
/* Number of Core Performance Counters */
unsigned int num_core_pmc:4;
+ unsigned int reserved:6;
+ /* Number of Data Fabric Counters */
+ unsigned int num_df_pmc:6;
} split;
unsigned int full;
};