diff options
author | Yazen Ghannam <yazen.ghannam@amd.com> | 2019-10-22 20:35:10 +0000 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2019-11-06 11:04:49 +0100 |
commit | 80355a3b2db9d0b713af5169e2cdd7f8fbfdad82 (patch) | |
tree | 3951df862903a2406823d28a459e52015ac0c5cc /drivers/edac/amd64_edac.h | |
parent | 38ddd4d1574530e1447b6ad91d27225d0f7662fb (diff) |
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/amd64_edac.h')
0 files changed, 0 insertions, 0 deletions