mbox series

[v2,0/7] Modularize ghes_edac driver

Message ID 20220817143458.335938-1-justin.he@arm.com
Headers show
Series Modularize ghes_edac driver | expand

Message

Jia He Aug. 17, 2022, 2:34 p.m. UTC
Commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of HEST and GHES in
apci_init()") introduced a bug that ghes_edac_register() would be invoked
before edac_init(). Because at that time, the bus "edac" hasn't been even
registered, this created sysfs /devices/mc0 instead of
/sys/devices/system/edac/mc/mc0 on an Ampere eMag server.

The solution is modularizing the ghes_edac driver.

Changelog:
v2:
 - add acked-by tag of Patch 1 from Ard
 - split the notifier patch
 - add 2 patch to get regular drivers selected when ghes edac is not loaded
 - fix an errno in igen6 driver
 - add a patch to fix the sparse warning of ghes
 - refine the commit logs

Jia He (7):
  efi/cper: export several helpers for ghes edac to use
  EDAC/ghes: Add notifier to report ghes_edac mem error
  EDAC/ghes: Modularize ghes_edac driver to remove the dependency on
    ghes
  EDAC: Get chipset-specific edac drivers selected only when ghes_edac
    is not enabled
  EDAC/ghes: Prevent chipset-specific edac from loading after ghes_edac
    is registered
  apei/ghes: Use unrcu_pointer for cmpxchg
  EDAC/igen6: Keep returned errno consistent when edac mc has been
    enabled

 drivers/acpi/apei/ghes.c    | 72 ++++++++++++++++++++++++++++++++---
 drivers/edac/Kconfig        |  4 +-
 drivers/edac/amd64_edac.c   |  3 ++
 drivers/edac/ghes_edac.c    | 76 ++++++++++++++++++++++++++-----------
 drivers/edac/igen6_edac.c   |  2 +-
 drivers/edac/pnd2_edac.c    |  3 ++
 drivers/edac/sb_edac.c      |  3 ++
 drivers/edac/skx_base.c     |  3 ++
 drivers/firmware/efi/cper.c |  3 ++
 include/acpi/ghes.h         | 37 ++++++------------
 10 files changed, 150 insertions(+), 56 deletions(-)

Comments

Borislav Petkov Aug. 18, 2022, 2:38 p.m. UTC | #1
On Wed, Aug 17, 2022 at 02:34:52PM +0000, Jia He wrote:
> Subject: Re: [PATCH v2 1/7] efi/cper: export several helpers for ghes edac to use

"ghes_edac"

> Before the ghes_edac codes are modularized, export several efi/cper helpers

"Before ghes_edac can be turned back into a proper module again, export
several helpers which are going to be used by it."

Thx.