| Lorenz Brun | d842aaf | 2025-02-17 17:39:46 +0100 | [diff] [blame^] | 1 | From 9558d3ae7a94a56e64e1ba00469b21c721323d0c Mon Sep 17 00:00:00 2001 |
| 2 | From: Lorenz Brun <lorenz@monogon.tech> |
| 3 | Date: Mon, 29 Jan 2024 22:17:13 +0100 |
| 4 | Subject: [PATCH] drivers: pstore: enable pmsg for ERST and EFI backends |
| 5 | |
| 6 | This enables pstore for userspace messages for the ACPI ERST as well as |
| 7 | the EFI variable pstore backend, both of which are expected to be used |
| 8 | frequently with Metropolis. We need that to reliably store panics of |
| 9 | core processes regardless of the system state. This is not enabled |
| 10 | upstream, either because pmsg was a later addition to pstore or for |
| 11 | concerns of accidentally running out of pstore space. We work around |
| 12 | the limited space issue by always clearing pstore after every boot, so |
| 13 | this poses little extra risk to us. |
| 14 | --- |
| 15 | drivers/acpi/apei/erst.c | 2 +- |
| 16 | drivers/firmware/efi/efi-pstore.c | 2 +- |
| 17 | 2 files changed, 2 insertions(+), 2 deletions(-) |
| Lorenz Brun | d1f82e9 | 2024-02-08 19:27:46 +0100 | [diff] [blame] | 18 | |
| 19 | diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c |
| 20 | index bf65e3461531..fe2c331b4b99 100644 |
| 21 | --- a/drivers/acpi/apei/erst.c |
| 22 | +++ b/drivers/acpi/apei/erst.c |
| 23 | @@ -1022,7 +1022,7 @@ static int erst_clearer(struct pstore_record *record); |
| 24 | static struct pstore_info erst_info = { |
| 25 | .owner = THIS_MODULE, |
| 26 | .name = "erst", |
| 27 | - .flags = PSTORE_FLAGS_DMESG, |
| 28 | + .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG, |
| 29 | .open = erst_open_pstore, |
| 30 | .close = erst_close_pstore, |
| 31 | .read = erst_reader, |
| 32 | diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c |
| Lorenz Brun | d842aaf | 2025-02-17 17:39:46 +0100 | [diff] [blame^] | 33 | index 552c78f5f059..9e5651fd1439 100644 |
| Lorenz Brun | d1f82e9 | 2024-02-08 19:27:46 +0100 | [diff] [blame] | 34 | --- a/drivers/firmware/efi/efi-pstore.c |
| 35 | +++ b/drivers/firmware/efi/efi-pstore.c |
| Lorenz Brun | d842aaf | 2025-02-17 17:39:46 +0100 | [diff] [blame^] | 36 | @@ -245,7 +245,7 @@ static int efi_pstore_erase(struct pstore_record *record) |
| Lorenz Brun | d1f82e9 | 2024-02-08 19:27:46 +0100 | [diff] [blame] | 37 | static struct pstore_info efi_pstore_info = { |
| 38 | .owner = THIS_MODULE, |
| 39 | .name = KBUILD_MODNAME, |
| 40 | - .flags = PSTORE_FLAGS_DMESG, |
| 41 | + .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG, |
| 42 | .open = efi_pstore_open, |
| 43 | .close = efi_pstore_close, |
| 44 | .read = efi_pstore_read, |
| Lorenz Brun | d842aaf | 2025-02-17 17:39:46 +0100 | [diff] [blame^] | 45 | -- |
| 46 | 2.47.2 |
| 47 | |