| From 9558d3ae7a94a56e64e1ba00469b21c721323d0c Mon Sep 17 00:00:00 2001 |
| From: Lorenz Brun <lorenz@monogon.tech> |
| Date: Mon, 29 Jan 2024 22:17:13 +0100 |
| Subject: [PATCH] drivers: pstore: enable pmsg for ERST and EFI backends |
| |
| This enables pstore for userspace messages for the ACPI ERST as well as |
| the EFI variable pstore backend, both of which are expected to be used |
| frequently with Metropolis. We need that to reliably store panics of |
| core processes regardless of the system state. This is not enabled |
| upstream, either because pmsg was a later addition to pstore or for |
| concerns of accidentally running out of pstore space. We work around |
| the limited space issue by always clearing pstore after every boot, so |
| this poses little extra risk to us. |
| --- |
| drivers/acpi/apei/erst.c | 2 +- |
| drivers/firmware/efi/efi-pstore.c | 2 +- |
| 2 files changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c |
| index bf65e3461531..fe2c331b4b99 100644 |
| --- a/drivers/acpi/apei/erst.c |
| +++ b/drivers/acpi/apei/erst.c |
| @@ -1022,7 +1022,7 @@ static int erst_clearer(struct pstore_record *record); |
| static struct pstore_info erst_info = { |
| .owner = THIS_MODULE, |
| .name = "erst", |
| - .flags = PSTORE_FLAGS_DMESG, |
| + .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG, |
| .open = erst_open_pstore, |
| .close = erst_close_pstore, |
| .read = erst_reader, |
| diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c |
| index 552c78f5f059..9e5651fd1439 100644 |
| --- a/drivers/firmware/efi/efi-pstore.c |
| +++ b/drivers/firmware/efi/efi-pstore.c |
| @@ -245,7 +245,7 @@ static int efi_pstore_erase(struct pstore_record *record) |
| static struct pstore_info efi_pstore_info = { |
| .owner = THIS_MODULE, |
| .name = KBUILD_MODNAME, |
| - .flags = PSTORE_FLAGS_DMESG, |
| + .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG, |
| .open = efi_pstore_open, |
| .close = efi_pstore_close, |
| .read = efi_pstore_read, |
| -- |
| 2.47.2 |
| |