From c2d7273be6c6f993340cfe5ae65f0e5a6e632606 Mon Sep 17 00:00:00 2001 From: Weilong Chen Date: Fri, 15 Dec 2023 16:07:20 +0800 Subject: [PATCH] ACPI / APEI: Notify all ras err to driver ascend inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8NC0E CVE: NA ------------------------------------------------- Customization deliver all types error to driver. As the driver need to process the errors in process context. Signed-off-by: Weilong Chen --- drivers/acpi/apei/Kconfig | 7 +++++++ drivers/acpi/apei/ghes.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/apei/Kconfig b/drivers/acpi/apei/Kconfig index 6b18f8bc7be3..1dce3ad7c9bd 100644 --- a/drivers/acpi/apei/Kconfig +++ b/drivers/acpi/apei/Kconfig @@ -33,6 +33,13 @@ config ACPI_APEI_GHES by firmware to produce more valuable hardware error information for Linux. +config ACPI_APEI_GHES_NOTIFY_ALL_RAS_ERR + bool "Notify all ras err to driver" + depends on ARM64 && ACPI_APEI_GHES + default n + help + Deliver all types of error to driver. + config ACPI_APEI_PCIEAER bool "APEI PCIe AER logging/recovering support" depends on ACPI_APEI && PCIEAER diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 63ad0541db38..bf1b9252a8da 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -692,12 +692,18 @@ static bool ghes_do_proc(struct ghes *ghes, queued = ghes_handle_arm_hw_error(gdata, sev); } else { void *err = acpi_hest_get_payload(gdata); - +#ifndef CONFIG_ACPI_APEI_GHES_NOTIFY_ALL_RAS_ERR ghes_defer_non_standard_event(gdata, sev); +#endif log_non_standard_event(sec_type, fru_id, fru_text, sec_sev, err, gdata->error_data_length); } + +#ifdef CONFIG_ACPI_APEI_GHES_NOTIFY_ALL_RAS_ERR + /* Customization deliver all types error to driver. */ + ghes_defer_non_standard_event(gdata, sev); +#endif } return queued; -- Gitee