]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf: Extend the bit width of the arch-specific flag
authorKan Liang <kan.liang@linux.intel.com>
Thu, 27 Mar 2025 19:52:15 +0000 (12:52 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 8 Apr 2025 18:55:49 +0000 (20:55 +0200)
commitc9449c8506a5df5052ef4d17867699517b10b55a
tree32506934009765b31f08f150d7d4af36506d8f91
parent0a6557938d8f189024a03aca77e58763930840ee
perf: Extend the bit width of the arch-specific flag

The auto counter reload feature requires an event flag to indicate an
auto counter reload group, which can only be scheduled on specific
counters that enumerated in CPUID. However, the hw_perf_event.flags has
run out on X86.

Two solutions were considered to address the issue.
- Currently, 20 bits are reserved for the architecture-specific flags.
  Only the bit 31 is used for the generic flag. There is still plenty
  of space left. Reserve 8 more bits for the arch-specific flags.
- Add a new X86 specific hw_perf_event.flags1 to support more flags.

The former is implemented. Enough room is still left in the global
generic flag.

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-4-kan.liang@linux.intel.com
arch/x86/events/perf_event_flags.h
include/linux/perf_event.h