* [PATCH] ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error
@ 2023-12-12 21:22 Tony Luck
2023-12-13 12:51 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Tony Luck @ 2023-12-12 21:22 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Erwin Tsaur, Borislav Petkov, linux-acpi, linux-kernel, patches,
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")
Reported-by: Erwin Tsaur <erwin.tsaur@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
drivers/acpi/acpi_extlog.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index e120a96e1eae..71e8d4e7a36c 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error
2023-12-12 21:22 [PATCH] ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error Tony Luck
@ 2023-12-13 12:51 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2023-12-13 12:51 UTC (permalink / raw)
To: Tony Luck
Cc: Rafael J. Wysocki, Erwin Tsaur, Borislav Petkov, linux-acpi,
linux-kernel, patches
On Tue, Dec 12, 2023 at 10:22 PM Tony Luck <tony.luck@intel.com> wrote:
>
> 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")
> Reported-by: Erwin Tsaur <erwin.tsaur@intel.com>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> drivers/acpi/acpi_extlog.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
> index e120a96e1eae..71e8d4e7a36c 100644
> --- a/drivers/acpi/acpi_extlog.c
> +++ b/drivers/acpi/acpi_extlog.c
> @@ -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;
> --
Applied as 6.8 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-13 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 21:22 [PATCH] ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error Tony Luck
2023-12-13 12:51 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox