linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] edac: sb_edac: Fix three minor problems
@ 2012-02-06  7:10 Hui Wang
  2012-02-06  7:10 ` [PATCH 1/3] edac: sb_edac: Let the driver depend on PCI_MMCONFIG Hui Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Wang @ 2012-02-06  7:10 UTC (permalink / raw)
  To: mchehab; +Cc: linux-edac, linux-kernel, tony.luck

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

Regards,
Hui.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] edac: sb_edac: Let the driver depend on PCI_MMCONFIG
  2012-02-06  7:10 [PATCH 0/3] edac: sb_edac: Fix three minor problems Hui Wang
@ 2012-02-06  7:10 ` Hui Wang
  2012-02-06  7:11   ` [PATCH 2/3] edac: sb_edac: Fix a INTERLEAVE_MODE() misuse Hui Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Wang @ 2012-02-06  7:10 UTC (permalink / raw)
  To: mchehab; +Cc: linux-edac, linux-kernel, tony.luck

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.

Signed-off-by: Hui Wang <jason77.wang@gmail.com>
---
 drivers/edac/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 5948a21..fdffa1b 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -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.
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] edac: sb_edac: Fix a INTERLEAVE_MODE() misuse
  2012-02-06  7:10 ` [PATCH 1/3] edac: sb_edac: Let the driver depend on PCI_MMCONFIG Hui Wang
@ 2012-02-06  7:11   ` Hui Wang
  2012-02-06  7:11     ` [PATCH 3/3] edac: sb_edac: Fix a wrong value setting for the Hui Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Wang @ 2012-02-06  7:11 UTC (permalink / raw)
  To: mchehab; +Cc: linux-edac, linux-kernel, tony.luck

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.

Signed-off-by: Hui Wang <jason77.wang@gmail.com>
---
 drivers/edac/sb_edac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 1dc118d..f84a515 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -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
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] edac: sb_edac: Fix a wrong value setting for the
  2012-02-06  7:11   ` [PATCH 2/3] edac: sb_edac: Fix a INTERLEAVE_MODE() misuse Hui Wang
@ 2012-02-06  7:11     ` Hui Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Hui Wang @ 2012-02-06  7:11 UTC (permalink / raw)
  To: mchehab; +Cc: linux-edac, linux-kernel, tony.luck

>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.

Signed-off-by: Hui Wang <jason77.wang@gmail.com>
---
 drivers/edac/sb_edac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index f84a515..178093f 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -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;
 	}
 
 	/*
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-06  7:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06  7:10 [PATCH 0/3] edac: sb_edac: Fix three minor problems Hui Wang
2012-02-06  7:10 ` [PATCH 1/3] edac: sb_edac: Let the driver depend on PCI_MMCONFIG Hui Wang
2012-02-06  7:11   ` [PATCH 2/3] edac: sb_edac: Fix a INTERLEAVE_MODE() misuse Hui Wang
2012-02-06  7:11     ` [PATCH 3/3] edac: sb_edac: Fix a wrong value setting for the Hui Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).