edac: sb_edac: Fix three minor problems
Subsystems (2)
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.
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
@@ -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
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
@@ -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
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
@@ -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