EDAC/amd64: Split prep_chip_selects() into dct/umc functions
authorMuralidhara M K <muralidhara.mk@amd.com>
Fri, 27 Jan 2023 17:04:09 +0000 (17:04 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 24 Mar 2023 12:03:20 +0000 (13:03 +0100)
commit637f60ef2cc7c015c2e065503f8da89272ab208d
tree27236bd1795e40951253c49a0ab498535f2e2c84
parent9a97a7f4d7b26cb61cdbb328b9d8982d94c99170
EDAC/amd64: Split prep_chip_selects() into dct/umc functions

Call them from their respective hw_info_get() function. Avoid the
need for family/model-based function pointers.

Add the calls before reading hardware registers from the memory
controllers, since the number of chip select bases and masks needs to be
known first.

  [ Yazen: rebased/reworked patch and reworded commit message. ]

Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com>
Co-developed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Co-developed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230127170419.1824692-13-yazen.ghannam@amd.com
drivers/edac/amd64_edac.c