EDAC/i10nm: Fix NVDIMM detection
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Wed, 18 Aug 2021 17:57:00 +0000 (10:57 -0700)
committerTony Luck <tony.luck@intel.com>
Mon, 23 Aug 2021 17:35:36 +0000 (10:35 -0700)
commit2294a7299f5e51667b841f63c6d69474491753fb
tree34ecbb048f624a6eb78ca8cb8912a5f85ad331a7
parentfd07a4a0d30b5468a1f4a0739e34f5f014df7d44
EDAC/i10nm: Fix NVDIMM detection

MCDDRCFG is a per-channel register and uses bit{0,1} to indicate
the NVDIMM presence on DIMM slot{0,1}. Current i10nm_edac driver
wrongly uses MCDDRCFG as per-DIMM register and fails to detect
the NVDIMM.

Fix it by reading MCDDRCFG as per-channel register and using its
bit{0,1} to check whether the NVDIMM is populated on DIMM slot{0,1}.

Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors")
Reported-by: Fan Du <fan.du@intel.com>
Tested-by: Wen Jin <wen.jin@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20210818175701.1611513-2-tony.luck@intel.com
drivers/edac/i10nm_base.c