mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 00/12] CPER: Add Memory Error Section 2 support
@ 2026-11-13 13:24 Pierre Gondois
  2026-11-13 13:24 ` [PATCH v4 01/12] cper: use BIT_ULL() for processor and memory validation bits Pierre Gondois
                   ` (13 more replies)
  0 siblings, 14 replies; 20+ messages in thread
From: Pierre Gondois @ 2026-11-13 13:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ashok Raj, James Morse, Mark Brown, Pierre Gondois,
	Rafael J. Wysocki, Len Brown, Tony Luck, Borislav Petkov,
	Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue,
	Maciej Wieczor-Retman, Pawel Chmielewski, Jonathan Cameron,
	Dave Jiang, Breno Leitao, Fabio M. De Francesco, Terry Bowman,
	Dan Williams, Ard Biesheuvel, Morduan Zang, linux-acpi,
	linux-edac, acpica-devel

The support is mostly duplicated from Memory Error Section handling.
Other than differences coming from the content of  Memory Error
Section 1 and 2, differences in the support are:

- v2 do not rely on a compact "struct cper_mem_err_compact" struct.
This structure was used to support older versions of the Memory
Error Section (1). This is not needed for the new structure.

- The compact version is also used by the tracing framework.
To avoid relying and propagating a non-standard record format,
through trace event (cf. extlog_mem event) the new trace event
prints each field individually.

The last patch of the serie was only build-tested due to the
absence of relevant hardware. apei_mce_report_mem_error() and
arch_apei_report_mem_error() implementations were also removed since
last version.

It will also require a proper handling from the rasdaemon. Applying
this last patch without rasdaemon support will silent the reports of
Memory Error Section 2 error, cf. ras_userspace_consumers() check.

Future:
- _OSC support (if agreed)
- Addition of arm64 tracepoints
https://lore.kernel.org/lkml/20261023170405.000060b8@oss.qualcomm.com/
- Emission of lossy CPER Mem error v1 tracepoints for legacy userspace
  tools
https://lore.kernel.org/lkml/at0rs4parlHFGI7k@hu-ashoraj-lv.qualcomm.com/


RFC: https://lore.kernel.org/all/20260929074659.2587216-1-pierre.gondois@arm.com/#t
V1:  https://lore.kernel.org/all/20261019145643.1877246-1-pierre.gondois@arm.com/
- Corrections from Jonathan's review
- New patch:
    [PATCH v2 4/6] EDAC/ghes: Extract error report initialization
- Last patch not in RFC as it has been reviewed by Jonathan@
    [PATCH v2 6/6] ACPI: extlog: add Memory Error Section 2 trace event
V2:
- Updated ghes_edac_init_error() to ghes_edac_init_error_desc(),
  which now only acts on the input "struct edac_raw_error_desc"
  + added lockdep_assert_held() to ghes_edac_init_error_desc()
- Accumulate failures with "queued |=" in ghes_do_proc()
- New PATCH:
  [PATCH v3 5/7] ACPI: APEI: Extract common memory failure handling

V3:
- Added <linux/bits.h> include
- Used pr_warn_rate_limited()
- Removed one warn for smbios handle overflow
- Replaced __string() -> __string_len() in trace event

Added patch to us scnprintf():
- cper: Return actual bytes written by DIMM location helpers
Added patches to increase buffer size and prevent overflows:
- EDAC/ghes: Small buffer fixes for mem other_detail helpers
- efi/cper: Pass buffer length to memory location helpers
- efi/cper: Pass buffer length to DIMM location helpers

Pierre Gondois (12):
  cper: use BIT_ULL() for processor and memory validation bits
  cper: add Memory Error Section 2 structures
  cper: add helpers to handle Memory Error Section 2
  cper: Return actual bytes written by DIMM location helpers
  EDAC/ghes: Extract error report initialization
  ACPI: APEI: Extract common memory failure handling
  ACPI: APEI: add separate Memory Error Section 2 handlers
  ACPI: extlog: add Memory Error Section 2 trace event
  efi/cper: Pass buffer length to DIMM location helpers
  efi/cper: Pass buffer length to memory location helpers
  EDAC/ghes: Small buffer fixes for mem other_detail helpers
  efi/cper: Increase memory error location and detail buffer sizes

 drivers/acpi/acpi_extlog.c  |   6 +
 drivers/acpi/apei/ghes.c    |  58 ++++++++--
 drivers/edac/ghes_edac.c    | 211 ++++++++++++++++++++++++++++--------
 drivers/firmware/efi/cper.c | 137 ++++++++++++++++++++---
 drivers/ras/ras.c           |   1 +
 include/acpi/ghes.h         |   2 +
 include/linux/cper.h        | 138 ++++++++++++++++-------
 include/linux/edac.h        |   2 +-
 include/ras/ras_event.h     | 102 +++++++++++++++++
 9 files changed, 548 insertions(+), 109 deletions(-)

--
2.43.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-11-25 16:58 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 13:24 [PATCH v4 00/12] CPER: Add Memory Error Section 2 support Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 01/12] cper: use BIT_ULL() for processor and memory validation bits Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 02/12] cper: add Memory Error Section 2 structures Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 03/12] cper: add helpers to handle Memory Error Section 2 Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 04/12] cper: Return actual bytes written by DIMM location helpers Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 05/12] EDAC/ghes: Extract error report initialization Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 06/12] ACPI: APEI: Extract common memory failure handling Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 07/12] ACPI: APEI: add separate Memory Error Section 2 handlers Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 08/12] ACPI: extlog: add Memory Error Section 2 trace event Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 09/12] efi/cper: Pass buffer length to DIMM location helpers Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 10/12] efi/cper: Pass buffer length to memory " Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 11/12] EDAC/ghes: Small buffer fixes for mem other_detail helpers Pierre Gondois
2026-11-24  4:30   ` Borislav Petkov
2026-11-25 16:29     ` Pierre Gondois
2026-11-13 13:24 ` [PATCH v4 12/12] efi/cper: Increase memory error location and detail buffer sizes Pierre Gondois
2026-11-24  4:24 ` [PATCH v4 00/12] CPER: Add Memory Error Section 2 support Borislav Petkov
2026-11-25 16:30   ` Pierre Gondois
2026-11-24 15:14 ` Yazen Ghannam
2026-11-25 16:30   ` Pierre Gondois
2026-11-25 16:58     ` Yazen Ghannam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®