Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf/x86/intel, x86/cpu: Replace Pentium 4 model checks with VFM ones

Introduce a name for an old Pentium 4 model and replace the x86_model
checks with VFM ones. This gets rid of one of the last remaining
Intel-specific x86_model checks.

Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250318223828.2945651-3-sohil.mehta@intel.com

authored by

Sohil Mehta and committed by
Ingo Molnar
de844ef5 8b70c743

+5 -3
+4 -3
arch/x86/events/intel/p4.c
··· 10 10 #include <linux/perf_event.h> 11 11 12 12 #include <asm/perf_event_p4.h> 13 + #include <asm/cpu_device_id.h> 13 14 #include <asm/hardirq.h> 14 15 #include <asm/apic.h> 15 16 ··· 733 732 { 734 733 /* INSTR_COMPLETED event only exist for model 3, 4, 6 (Prescott) */ 735 734 if (event_idx == P4_EVENT_INSTR_COMPLETED) { 736 - if (boot_cpu_data.x86_model != 3 && 737 - boot_cpu_data.x86_model != 4 && 738 - boot_cpu_data.x86_model != 6) 735 + if (boot_cpu_data.x86_vfm != INTEL_P4_PRESCOTT && 736 + boot_cpu_data.x86_vfm != INTEL_P4_PRESCOTT_2M && 737 + boot_cpu_data.x86_vfm != INTEL_P4_CEDARMILL) 739 738 return false; 740 739 } 741 740
+1
arch/x86/include/asm/intel-family.h
··· 193 193 /* Family 15 - NetBurst */ 194 194 #define INTEL_P4_WILLAMETTE IFM(15, 0x01) /* Also Xeon Foster */ 195 195 #define INTEL_P4_PRESCOTT IFM(15, 0x03) 196 + #define INTEL_P4_PRESCOTT_2M IFM(15, 0x04) 196 197 #define INTEL_P4_CEDARMILL IFM(15, 0x06) /* Also Xeon Dempsey */ 197 198 198 199 /* Family 19 */