The RAS consumer check removes: - trace events when no daemon is registered - CPER console report when one is registered This ties tracing, PCIe recovery and CXL protocol delivery to daemon registration, and can hide a fatal record when userspace cannot process its trace event before a reset.
Remove the RAS consumer registration condition and: - always emit trace events - print the CPER record only for CPER_SEV_FATAL [1] additionally suggested to have a cmdline parameter to dynamically update the above policy. Keep a simple hard coded policy for now. [1] https://lore.kernel.org/lkml/20240521183913.GGZkzqUSN1hdE-_OEY@fat_crate.local/ Signed-off-by: Pierre Gondois <[email protected]> --- drivers/acpi/acpi_extlog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c index e09ea571c32f5..16a16b12d8ccf 100644 --- a/drivers/acpi/acpi_extlog.c +++ b/drivers/acpi/acpi_extlog.c @@ -208,10 +208,9 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, if (cper_estatus_len(tmp) > ELOG_ENTRY_LEN || cper_estatus_check(tmp)) return NOTIFY_DONE; - if (!ras_userspace_consumers()) { + /* Print fatal records regardless of RAS consumer registration. */ + if (tmp->error_severity == CPER_SEV_FATAL) print_extlog_rcd(NULL, tmp, cpu); - goto out; - } /* log event via trace */ err_seq++; @@ -255,7 +254,6 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, } } -out: mce->kflags |= MCE_HANDLED_EXTLOG; return NOTIFY_OK; } -- 2.43.0
