]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/edac/amd64_edac.c
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)
commit582f94b5900a9bccca993dc16ca77364a0aa12a9
tree53cac75f8a6da2aad235dda3116c186381914180
parent1c9b08bac5bf4f4825631c885eba84461e4eed79
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