]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC/amd64: Check for memory before fully initializing an instance
authorYazen Ghannam <yazen.ghannam@amd.com>
Wed, 6 Nov 2019 01:25:01 +0000 (01:25 +0000)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Nov 2019 10:10:11 +0000 (11:10 +0100)
commitfc2dfbd43993a8732c54ea22f6051ed27457000c
tree53cac75f8a6da2aad235dda3116c186381914180
parent7c802a2ccc2b3ec52bcd4c03a1a7c9b8d613dbb7
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
drivers/edac/amd64_edac.c