perf/x86/lbr: Switch to new Intel CPU model defines
authorTony Luck <tony.luck@intel.com>
Wed, 24 Apr 2024 18:15:00 +0000 (11:15 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 25 Apr 2024 16:04:32 +0000 (09:04 -0700)
New CPU #defines encode vendor and family as well as model.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20240424181500.41519-1-tony.luck%40intel.com
arch/x86/events/intel/lbr.c

index 78cd5084104e9c205a6e949f6ee1ce6b93060fb0..86277196ffaddab598c4226726b95fd53f51422c 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/perf_event.h>
 #include <linux/types.h>
 
+#include <asm/cpu_device_id.h>
 #include <asm/perf_event.h>
 #include <asm/msr.h>
 
@@ -1457,7 +1458,7 @@ void __init intel_pmu_lbr_init_atom(void)
         * to have an operational LBR which can freeze
         * on PMU interrupt
         */
-       if (boot_cpu_data.x86_model == 28
+       if (boot_cpu_data.x86_vfm == INTEL_ATOM_BONNELL
            && boot_cpu_data.x86_stepping < 10) {
                pr_cont("LBR disabled due to erratum");
                return;