EDAC, sb_edac: Check if ECC enabled when at least one DIMM is present
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Thu, 25 May 2017 12:46:53 +0000 (14:46 +0200)
committerBorislav Petkov <bp@suse.de>
Thu, 25 May 2017 12:57:52 +0000 (14:57 +0200)
commit4d475dde79b561bbd843d7deb7100f9e75596487
treeb891cc4bbc3440dbf241d7e5fd1519db26bb0fe3
parent3286d3eb906cbac832884dda8ce2fdc7acb17a65
EDAC, sb_edac: Check if ECC enabled when at least one DIMM is present

This is based on previous work by Patrick Geary, see Link.

Additional cleanups ontop:

 - Remove the code to read MCMTR from pci_ha1_ta and CHN_TO_HA macro,
 now that TA0 and TA1 are unified.

 - Remove get_pdev_same_bus(), since in get_dimm_config() the
 variable "pvt->pci_ta" for KNL is also ready, we can simply use
 pci_read_config_dword(pvt->pci_ta, KNL_MCMTR, &pvt->info.mcmtr) to read
 MCMTR.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: https://lkml.kernel.org/r/57884350.1030401@supermicro.com
Link: http://lkml.kernel.org/r/20170523000910.87925-1-qiuxu.zhuo@intel.com
[ Make __populate_dimms() return int. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/sb_edac.c