Skip to contentSkip to conversation

ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error

PATCH Applied Tony Luck 2 participants 2 messages Dec 12, 2023 – Dec 13, 2023 ACPI

lore
Share & tools
lore

Tony Luck

author
#0 lore raw

PATCH 1/1 ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error

When both CONFIG_RAS_CEC and CONFIG_ACPI_EXTLOG are enabled, Linux does not clear the status word of the BIOS supplied error record for corrected errors. This may prevent logging of subsequent uncorrected errors.

Fix by clearing the status.

Fixes 23ba710a0864 ("x86/mce: Fix all mce notifiers to update the mce->kflags bitmask")
---
 drivers/acpi/acpi_extlog.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/acpi/acpi_extlog.c +6 -1
index e120a96e1eae..71e8d4e7a36c 100644
@@ -145,9 +145,14 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 	static u32 err_seq;
 
 	estatus = extlog_elog_entry_check(cpu, bank);
-	if (estatus == NULL || (mce->kflags & MCE_HANDLED_CEC))
+	if (!estatus)
 		return NOTIFY_DONE;
 
+	if (mce->kflags & MCE_HANDLED_CEC) {
+		estatus->block_status = 0;
+		return NOTIFY_DONE;
+	}
+
 	memcpy(elog_buf, (void *)estatus, ELOG_ENTRY_LEN);
 	/* clear record status to enable BIOS to update it again */
 	estatus->block_status = 0;
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 25 lines · Tony Luck

When both CONFIG_RAS_CEC and CONFIG_ACPI_EXTLOG are enabled, Linux does not clear the status word of the BIOS supplied error record for corrected errors. This may prevent logging of subsequent uncorrected errors.

Fix by clearing the status.

Fixes 23ba710a0864 ("x86/mce: Fix all mce notifiers to update the mce->kflags bitmask")
---
 drivers/acpi/acpi_extlog.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/acpi/acpi_extlog.c +1 -1
index e120a96e1eae..71e8d4e7a36c 100644
@@ -145,9 +145,14 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
        static u32 err_seq;
 
        estatus = extlog_elog_entry_check(cpu, bank);
-       if (estatus == NULL || (mce->kflags & MCE_HANDLED_CEC))
+       if (!estatus)
                return NOTIFY_DONE;

drivers/acpi/acpi_extlog.c static int extlog_print(struct notifier_block *nb, unsigned long val,

Quoted 10 lines
drivers/acpi/acpi_extlog.c +5 -1
 
+       if (mce->kflags & MCE_HANDLED_CEC) {
+               estatus->block_status = 0;
+               return NOTIFY_DONE;
+       }
+
        memcpy(elog_buf, (void *)estatus, ELOG_ENTRY_LEN);
        /* clear record status to enable BIOS to update it again */
        estatus->block_status = 0;
--

Applied as 6.8 material, thanks!