Skip to contentSkip to conversation

EDAC, sb_edac: Use Intel family processor macros

PATCH Superseded Piotr Luc 1 participant 3 messages Oct 12, 2016

Subsystems (2)
lore
Share & tools
lore

Piotr Luc

author
#0 lore raw

cover EDAC, sb_edac: Use Intel family processor macros

The intention of this series is to add KNM CPU ID to EDAC. The first patch improves code style by replacing raw numbers of CPUIDs with descriptive macros of processor names and removes trailing comments that are not needed anymore.
The second patch enables EDAC to support KNM processor.

The second patch depends on patch:
x86/cpu/intel: Add Knights Mill to Intel family
https://lkml.kernel.org/r/20161012180520.30976-1-piotr.luc () intel ! com

Piotr Luc (2):
EDAC, sb_edac: Use Intel family processor macros EDAC, sb_edac: Add Knights Mill CPUID

 drivers/edac/sb_edac.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
2.10.1
author
#1 lore raw

PATCH 1/2 EDAC, sb_edac: Use Intel family processor macros

Use macros of Intel processor families instead of raw numbers.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "Luck, Tony" <[email protected]>
Cc "Shevchenko, Andriy" <[email protected]>
---
 drivers/edac/sb_edac.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/edac/sb_edac.c +7 -6
index ce0067b..90564bc 100644
@@ -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);
Signature · 1 line
2.10.1
author
#2 lore raw

PATCH 2/2 EDAC, sb_edac: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "Luck, Tony" <[email protected]>
Cc "Shevchenko, Andriy" <[email protected]>

---
Depends-on: x86/cpu/intel: Add Knights Mill to Intel family
https://lkml.kernel.org/r/20161012180520.30976-1-piotr.luc () intel ! com

 drivers/edac/sb_edac.c | 1 +
 1 file changed, 1 insertion(+)
drivers/edac/sb_edac.c +1 -0
index 90564bc..3ffc737 100644
@@ -3373,6 +3373,7 @@ static const struct x86_cpu_id sbridge_cpuids[] = {
 	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),
+	ICPU(INTEL_FAM6_XEON_PHI_KNM, pci_dev_descr_knl_table),
 	{ }
 };
 MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
Signature · 1 line
2.10.1