EDAC/ghes: Scan the system once on driver init
authorBorislav Petkov <bp@suse.de>
Wed, 3 Jun 2020 19:19:21 +0000 (21:19 +0200)
committerBorislav Petkov <bp@suse.de>
Tue, 16 Jun 2020 17:25:15 +0000 (19:25 +0200)
commitb9cae27728d1f9c9ed858adf012adddfcd8d3802
tree14472c20de8a265e9789164c6fbf314e18f1060a
parentb001694d60fe4dafcd0dad2ae9f4d2f33c463ba1
EDAC/ghes: Scan the system once on driver init

Change the hardware scanning and figuring out how many DIMMs a machine
has to a single, one-time thing which happens once on driver init. After
that scanning completes, struct ghes_hw_desc contains a representation
of the hardware which the driver can then use for later initialization.

Then, copy the DIMM information into the respective EDAC core
representation of those.

Get rid of ghes_edac_dimm_fill and use a struct dimm_info array
directly.

This way, hw detection and further driver initialization is nicely
and logically split. Further additions should all be added to
ghes_scan_system() and the hw representation extended as needed.

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/ghes_edac.c