edac: use Intel Model Macros instead of open-coding them
Subsystems (3)
PATCH 1/1 edac: use Intel Model Macros instead of open-coding them
From: Dave Hansen <[email protected]>
We now have symbolic names for a bunch of Intel cpu modes via asm/intel-family.h. The original conversion missed the edac drivers. Convert them.
Signed-off-by Dave Hansen <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Tony Luck <[email protected]>
---
b/drivers/edac/sb_edac.c | 13 +++++++------ b/drivers/edac/skx_edac.c | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-)
drivers/edac/sb_edac.c renamed from drivers/edac/sb_edac.c~sb-edac-model-numbers +7 -6
@@ -23,6 +23,7 @@#include <linux/math64.h> #include <linux/mod_devicetable.h> #include <asm/cpu_device_id.h> +#include <asm/intel-family.h> #include <asm/processor.h> #include <asm/mce.h>
@@ -3366,12 +3367,12 @@ fail0: { X86_VENDOR_INTEL, 6, model, 0, (unsigned long)&table }static const struct x86_cpu_id sbridge_cpuids[] = { -ICPU (0x2d , pci_dev_descr_sbridge_table),/* SANDY_BRIDGE */ -ICPU (0x3e , pci_dev_descr_ibridge_table),/* IVY_BRIDGE */ -ICPU (0x3f , pci_dev_descr_haswell_table),/* HASWELL */ -ICPU (0x4f , pci_dev_descr_broadwell_table),/* BROADWELL */ -ICPU (0x56 , pci_dev_descr_broadwell_table),/* BROADWELL-DE */ -ICPU (0x57 , pci_dev_descr_knl_table),/* KNIGHTS_LANDING */ +ICPU (INTEL_FAM6_SANDYBRIDGE_X , pci_dev_descr_sbridge_table), +ICPU (INTEL_FAM6_IVYBRIDGE_X , pci_dev_descr_ibridge_table), +ICPU (INTEL_FAM6_HASWELL_X , pci_dev_descr_haswell_table), +ICPU (INTEL_FAM6_BROADWELL_X , pci_dev_descr_broadwell_table), +ICPU (INTEL_FAM6_BROADWELL_XEON_D , pci_dev_descr_broadwell_table), +ICPU (INTEL_FAM6_XEON_PHI_KNL , pci_dev_descr_knl_table), { } };MODULE_DEVICE_TABLE (x86cpu, sbridge_cpuids);
drivers/edac/skx_edac.c renamed from drivers/edac/skx_edac.c~sb-edac-model-numbers +2 -1
@@ -25,6 +25,7 @@#include <linux/math64.h> #include <linux/mod_devicetable.h> #include <asm/cpu_device_id.h> +#include <asm/intel-family.h> #include <asm/processor.h> #include <asm/mce.h>
@@ -263,7 +264,7 @@ fail: }const struct x86_cpu_id skx_cpuids[] = { - {X86_VENDOR_INTEL ,6 ,0x55 ,0 ,0 },/* Skylake */ + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_SKYLAKE_X ,0 ,0 },/* Skylake */ { } };MODULE_DEVICE_TABLE (x86cpu, skx_cpuids);
_