]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf/x86/core: Do not set bit width for unavailable counters
authorSandipan Das <sandipan.das@amd.com>
Sat, 6 Dec 2025 00:16:46 +0000 (16:16 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 17 Dec 2025 12:31:06 +0000 (13:31 +0100)
commitb456a6ba5756b6fb7e651775343e713bd08418e7
treedb46eabe2d82c38f37a8a85b52c737778ce33150
parent560ac136f25da2da44a8b68d581adfdc8230b7e2
perf/x86/core: Do not set bit width for unavailable counters

Not all x86 processors have fixed counters. It may also be the case that
a processor has only fixed counters and no general-purpose counters. Set
the bit widths corresponding to each counter type only if such counters
are available.

Fixes: b3d9468a8bd2 ("perf, x86: Expose perf capability to other modules")
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Co-developed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Xudong Hao <xudong.hao@intel.com>
Link: https://patch.msgid.link/20251206001720.468579-11-seanjc@google.com
arch/x86/events/core.c