]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf/x86/intel: Use cache cpu-type for hybrid PMU selection
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Thu, 12 Dec 2024 06:57:36 +0000 (22:57 -0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 27 Feb 2025 12:34:52 +0000 (13:34 +0100)
commitc4a8b7116b9927f7b00bd68140e285662a03068e
tree57814e29a6c36fc0b77aae348d5076c6df59a47b
parentb52aaeeadfac54c91005e044b72b62616a5864a9
perf/x86/intel: Use cache cpu-type for hybrid PMU selection

get_this_hybrid_cpu_type() misses a case when cpu-type is populated
regardless of X86_FEATURE_HYBRID_CPU. This is particularly true for hybrid
variants that have P or E cores fused off.

Instead use the cpu-type cached in struct x86_topology, as it does not rely
on hybrid feature to enumerate cpu-type. This can also help avoid the
model-specific fixup get_hybrid_cpu_type(). Also replace the
get_this_hybrid_cpu_native_id() with its cached value in struct
x86_topology.

While at it, remove enum hybrid_cpu_type as it serves no purpose when we
have the exact cpu-types defined in enum intel_cpu_type. Also rename
atom_native_id to intel_native_id and move it to intel-family.h where
intel_cpu_type lives.

Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20241211-add-cpu-type-v5-3-2ae010f50370@linux.intel.com
arch/x86/events/intel/core.c
arch/x86/events/perf_event.h
arch/x86/include/asm/intel-family.h