Skip to contentSkip to conversation

edac: Handle EDAC ECC errors for Family 16h

PATCH Superseded Aravind Gopalakrishnan 1 participant 1 message Apr 15, 2013

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 edac: Handle EDAC ECC errors for Family 16h

Add code to handle ECC decoding for fam16h. Support exists for previous families already, so code has been reused werever applicable and some code has been added to handle fam16h specific operations.

The patch was tested on Fam16h with ECC turned on
using the mce_amd_inj facility and works fine.

---
 arch/x86/kernel/amd_nb.c  |    4 +-
 drivers/edac/amd64_edac.c |   96 +++++++++++++++++++++++++++++++++++++++++++--
 drivers/edac/amd64_edac.h |    8 +++-
 include/linux/pci_ids.h   |    2 +
 4 files changed, 105 insertions(+), 5 deletions(-)
arch/x86/kernel/amd_nb.c +3 -1
index 4c39baa..9df1034 100644
@@ -16,12 +16,14 @@ const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
 	{}
 };
 EXPORT_SYMBOL(amd_nb_misc_ids);
 
 static struct pci_device_id amd_nb_link_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
 	{}
 };
 
@@ -79,7 +81,7 @@ int amd_cache_northbridges(void)
 
 	/* some CPU families (e.g. family 0x11) do not support GART */
 	if (boot_cpu_data.x86 == 0xf || boot_cpu_data.x86 == 0x10 ||
-	    boot_cpu_data.x86 == 0x15)
+	    boot_cpu_data.x86 == 0x15 || boot_cpu_data.x86 == 0x16)
 		amd_northbridges.flags |= AMD_NB_GART;
 
 	/*
drivers/edac/amd64_edac.c +93 -3

150 lines not on this page · raw message

drivers/edac/amd64_edac.h +7 -1
index 9a666cb..e80306d 100644
@@ -36,6 +36,10 @@
  *	Changes/Fixes by Borislav Petkov <[email protected]>:
  *		- misc fixes and code cleanups
  *
+ *	Changes by Aravind Gopalakrishnan <[email protected]>
+ *		- family 16h support added. New PCI Device IDs and some code
+ *		to perform fam 16h specific ops.
+ *
  * This module is based on the following documents
  * (available from http://www.amd.com/):
  *
@@ -172,7 +176,8 @@
  */
 #define PCI_DEVICE_ID_AMD_15H_NB_F1	0x1601
 #define PCI_DEVICE_ID_AMD_15H_NB_F2	0x1602
-
+#define PCI_DEVICE_ID_AMD_16H_NB_F1	0x1531
+#define PCI_DEVICE_ID_AMD_16H_NB_F2	0x1532
 
 /*
  * Function 1 - Address Map
@@ -300,6 +305,7 @@ enum amd_families {
 	K8_CPUS = 0,
 	F10_CPUS,
 	F15_CPUS,
+	F16_CPUS,
 	NUM_FAMILIES,
 };
 
include/linux/pci_ids.h +2 -0
index 1679ff6..59f732f 100644
@@ -519,6 +519,8 @@
 #define PCI_DEVICE_ID_AMD_11H_NB_LINK	0x1304
 #define PCI_DEVICE_ID_AMD_15H_NB_F3	0x1603
 #define PCI_DEVICE_ID_AMD_15H_NB_F4	0x1604
+#define PCI_DEVICE_ID_AMD_16H_NB_F3	0x1533
+#define PCI_DEVICE_ID_AMD_16H_NB_F4	0x1534
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
Signature · 1 line
1.7.10.4