aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/pnd2_edac.c
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2019-10-22 20:35:10 +0000
committerBorislav Petkov <bp@suse.de>2019-11-06 11:04:49 +0100
commit80355a3b2db9d0b713af5169e2cdd7f8fbfdad82 (patch)
tree3951df862903a2406823d28a459e52015ac0c5cc /drivers/edac/pnd2_edac.c
parentEDAC/amd64: Make struct amd64_family_type global (diff)
downloadlinux-dev-80355a3b2db9d0b713af5169e2cdd7f8fbfdad82.tar.xz
linux-dev-80355a3b2db9d0b713af5169e2cdd7f8fbfdad82.zip
EDAC/amd64: Gather hardware information early
Split out gathering hardware information from init_one_instance() into a separate function hw_info_get(). This is necessary so that the information can be cached earlier and used to check if memory is populated and if ECC is enabled on a node. Also, define a function hw_info_put() to back out changes made in hw_info_get(). Check for an allocated PCI device (Function 0 for Family 17h or Function 1 for pre-Family 17h) before freeing, since hw_info_put() may be called before PCI siblings are reserved. Drop the family check when freeing pvt->umc. This will be NULL on pre-Family 17h systems. However, kfree() is safe and will check for a NULL pointer before freeing. 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-3-Yazen.Ghannam@amd.com
Diffstat (limited to 'drivers/edac/pnd2_edac.c')
0 files changed, 0 insertions, 0 deletions