perf/x86/intel: Add CPUID enumeration for the auto counter reload
authorKan Liang <kan.liang@linux.intel.com>
Thu, 27 Mar 2025 19:52:16 +0000 (12:52 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 8 Apr 2025 18:55:49 +0000 (20:55 +0200)
commit1856c6c2f8416b1340652cccfa1fc302ac8d5ecd
treee375a8ccb41603900efccc51b36e3ccf9272f869
parentc9449c8506a5df5052ef4d17867699517b10b55a
perf/x86/intel: Add CPUID enumeration for the auto counter reload

The counters that support the auto counter reload feature can be
enumerated in the CPUID Leaf 0x23 sub-leaf 0x2.

Add acr_cntr_mask to store the mask of counters which are reloadable.
Add acr_cause_mask to store the mask of counters which can cause reload.
Since the e-core and p-core may have different numbers of counters,
track the masks in the struct x86_hybrid_pmu as well.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Link: https://lkml.kernel.org/r/20250327195217.2683619-5-kan.liang@linux.intel.com
arch/x86/events/intel/core.c
arch/x86/events/perf_event.h
arch/x86/include/asm/perf_event.h