Skip to contentSkip to conversation

edac: sb_edac: Fix three minor problems

PATCH New Hui Wang 1 participant 4 messages Feb 6, 2012

Subsystems (2)
lore
Share & tools
lore

Hui Wang

author
#0 lore raw

cover edac: sb_edac: Fix three minor problems

The three problems are Sandybridge EDAC driver specific, they are minor and straightforward, no need to add more explanation here.

Regards,
Hui.

author
#1 lore raw

PATCH 1/3 edac: sb_edac: Let the driver depend on PCI_MMCONFIG

This driver needs to access PCIe Extended Configuration Space Registers (0x100~0xfff), to correctly access those registers, we need to enable PCI_MMCONFIG option. Since this option is not enabled for X86_64 by default, we let the driver depend on it to prevent users forgetting to enable this option.

---
 drivers/edac/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/Kconfig +1 -1
index 5948a21..fdffa1b 100644
@@ -215,7 +215,7 @@ config EDAC_I7300
 config EDAC_SBRIDGE
 	tristate "Intel Sandy-Bridge Integrated MC"
 	depends on EDAC_MM_EDAC && PCI && X86_64 && X86_MCE_INTEL
-	depends on EXPERIMENTAL
+	depends on PCI_MMCONFIG && EXPERIMENTAL
 	help
 	  Support for error detection and correction the Intel
 	  Sandy Bridge Integrated Memory Controller.
Signature · 1 line
1.7.6
author
#2 lore raw

PATCH 2/3 edac: sb_edac: Fix a INTERLEAVE_MODE() misuse

We can identify dram interleave mode from the Dram Rule register rather than Dram Interleave list register.

In this context, the reg of INTERLEAVE_MODE(reg) contains the Dram Interleave list register, we can't get interleave mode from the reg, while the variable interleave_mode saves the the mode got from the Dram Rule register, so we use the variable to replace INTERLEAVE_MDDE(reg) here.

---
 drivers/edac/sb_edac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/sb_edac.c +1 -1
index 1dc118d..f84a515 100644
@@ -913,7 +913,7 @@ static int get_memory_error_data(struct mem_ctl_info *mci,
 		addr,
 		limit,
 		sad_way + 7,
-		INTERLEAVE_MODE(reg) ? "" : "XOR[18:16]");
+		interleave_mode ? "" : "XOR[18:16]");
 	if (interleave_mode)
 		idx = ((addr >> 6) ^ (addr >> 16)) & 7;
 	else
Signature · 1 line
1.7.6
author
#3 lore raw

PATCH 3/3 edac: sb_edac: Fix a wrong value setting for the

Quoted 1 line

From the driver design, the variable limit wants to compare with its

previous value, we should set the value of limit instead of the value of tmp_mb to the variable prev.

---
 drivers/edac/sb_edac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/sb_edac.c +1 -1
index f84a515..178093f 100644
@@ -757,7 +757,7 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
 			(u32)TAD_TGT2(reg),
 			(u32)TAD_TGT3(reg),
 			reg);
-		prv = tmp_mb;
+		prv = limit;
 	}
 
 	/*
Signature · 1 line
1.7.6