diff options
author | Charles Rose <charles.rose@dell.com> | 2017-09-25 10:10:43 -0700 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2017-09-27 17:31:38 +0200 |
commit | a9c0a10888614603cc38b6f60250e92932f24a37 (patch) | |
tree | 7b2e139a71d0e40000956640623d09f425fe6745 /drivers/edac/skx_edac.c | |
parent | 15cc3ae001873845b5d842e212478a6570c7d938 (diff) | |
download | linux-a9c0a10888614603cc38b6f60250e92932f24a37.tar.gz linux-a9c0a10888614603cc38b6f60250e92932f24a37.tar.bz2 linux-a9c0a10888614603cc38b6f60250e92932f24a37.zip |
EDAC, skx_edac: Fix detection of single-rank DIMMs
Single-rank DIMMs did not get detected on Skylake/Kabylake systems due
to wrong limit check. The single rank DIMM check is a simple typo. "0"
is a legal value in this field meaning single rank.
Signed-off-by: Charles Rose <charles.rose@dell.com>
Cc: Aristeu Rozanski <arozansk@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/66df72d327c265fbf92fe25df96daa228a35f076.1506358467.git.tony.luck@intel.com
[ Also fix debug message to print number of ranks. ]
Signed-off-by: Tony Luck <tony.luck@intel.com>
[ Expand commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/skx_edac.c')
-rw-r--r-- | drivers/edac/skx_edac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c index e8e570e73796..9ca40a3fe03f 100644 --- a/drivers/edac/skx_edac.c +++ b/drivers/edac/skx_edac.c @@ -301,7 +301,7 @@ static int get_dimm_attr(u32 reg, int lobit, int hibit, int add, int minval, #define IS_DIMM_PRESENT(mtr) GET_BITFIELD((mtr), 15, 15) -#define numrank(reg) get_dimm_attr((reg), 12, 13, 0, 1, 2, "ranks") +#define numrank(reg) get_dimm_attr((reg), 12, 13, 0, 0, 2, "ranks") #define numrow(reg) get_dimm_attr((reg), 2, 4, 12, 1, 6, "rows") #define numcol(reg) get_dimm_attr((reg), 0, 1, 10, 0, 2, "cols") @@ -362,7 +362,7 @@ static int get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm, edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n", imc->mc, chan, dimmno, size, npages, - banks, ranks, rows, cols); + banks, 1 << ranks, rows, cols); imc->chan[chan].dimms[dimmno].close_pg = GET_BITFIELD(mtr, 0, 0); imc->chan[chan].dimms[dimmno].bank_xor_enable = GET_BITFIELD(mtr, 9, 9); |