提交 20f4d692 编写于 作者: D Dave Hansen 提交者: Borislav Petkov

EDAC, {sb,skx}_edac: Use Intel model macros instead of open-coding them

We now have symbolic names for a bunch of Intel CPU models via
asm/intel-family.h. The original conversion missed the EDAC drivers.
Convert them.
Signed-off-by: NDave Hansen <dave.hansen@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20160929204321.9FAE5F84@viggo.jf.intel.com
[ Remove comment, macro name is descriptive enough. ]
Signed-off-by: NBorislav Petkov <bp@suse.de>
上级 08328814
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/math64.h> #include <linux/math64.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <asm/cpu_device_id.h> #include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mce.h> #include <asm/mce.h>
...@@ -3365,12 +3366,12 @@ static int sbridge_register_mci(struct sbridge_dev *sbridge_dev, enum type type) ...@@ -3365,12 +3366,12 @@ static int sbridge_register_mci(struct sbridge_dev *sbridge_dev, enum type type)
{ X86_VENDOR_INTEL, 6, model, 0, (unsigned long)&table } { X86_VENDOR_INTEL, 6, model, 0, (unsigned long)&table }
static const struct x86_cpu_id sbridge_cpuids[] = { static const struct x86_cpu_id sbridge_cpuids[] = {
ICPU(0x2d, pci_dev_descr_sbridge_table), /* SANDY_BRIDGE */ ICPU(INTEL_FAM6_SANDYBRIDGE_X, pci_dev_descr_sbridge_table),
ICPU(0x3e, pci_dev_descr_ibridge_table), /* IVY_BRIDGE */ ICPU(INTEL_FAM6_IVYBRIDGE_X, pci_dev_descr_ibridge_table),
ICPU(0x3f, pci_dev_descr_haswell_table), /* HASWELL */ ICPU(INTEL_FAM6_HASWELL_X, pci_dev_descr_haswell_table),
ICPU(0x4f, pci_dev_descr_broadwell_table), /* BROADWELL */ ICPU(INTEL_FAM6_BROADWELL_X, pci_dev_descr_broadwell_table),
ICPU(0x56, pci_dev_descr_broadwell_table), /* BROADWELL-DE */ ICPU(INTEL_FAM6_BROADWELL_XEON_D, pci_dev_descr_broadwell_table),
ICPU(0x57, pci_dev_descr_knl_table), /* KNIGHTS_LANDING */ ICPU(INTEL_FAM6_XEON_PHI_KNL, pci_dev_descr_knl_table),
{ } { }
}; };
MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids); MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/math64.h> #include <linux/math64.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <asm/cpu_device_id.h> #include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mce.h> #include <asm/mce.h>
...@@ -263,7 +264,7 @@ static int get_all_munits(const struct munit *m) ...@@ -263,7 +264,7 @@ static int get_all_munits(const struct munit *m)
} }
const struct x86_cpu_id skx_cpuids[] = { 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 },
{ } { }
}; };
MODULE_DEVICE_TABLE(x86cpu, skx_cpuids); MODULE_DEVICE_TABLE(x86cpu, skx_cpuids);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册