Yazen Ghannam 582f94b590 EDAC/amd64: Check for memory before fully initializing an instance
Return early before checking for ECC if the node does not have any
populated memory.

Free any cached hardware data before returning. Also, return 0 in this
case since this is not a failure. Other nodes may have memory and the
module should attempt to load an instance for them.

Move printing of hardware information to after the instance is
initialized, so that the information is only printed for nodes with
memory.

Return an error code when ECC is disabled. This check happens after
checking for memory. The module should explicitly fail to load if memory
is populated on a node and ECC is disabled.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Robert Richter <rrichter@marvell.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20191106012448.243970-6-Yazen.Ghannam@amd.com
2019-11-06 11:10:11 +01:00
..
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00
2019-09-22 09:39:09 -07:00
2019-09-22 09:39:09 -07:00
2011-04-19 00:23:22 +02:00
2017-07-17 13:42:48 +02:00
2017-07-17 13:42:48 +02:00