blob: 8886d94cd54f6dcbd2460a153d2c4126d2f29e7b [file] [log] [blame]
Lorenz Brund1f82e92024-02-08 19:27:46 +01001This enables pstore for userspace messages for the ACPI ERST as well as the
2EFI variable pstore backend, both of which are expected to be used frequently
3with Metropolis. We need that to reliably store panics of core processes
4regardless of the system state. This is not enabled upstream, either because
5pmsg was a later addition to pstore or for concerns of accidentally running
6out of pstore space. We work around the limited space issue by always clearing
7pstore after every boot, so this poses little extra risk to us.
8
9diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
10index bf65e3461531..fe2c331b4b99 100644
11--- a/drivers/acpi/apei/erst.c
12+++ b/drivers/acpi/apei/erst.c
13@@ -1022,7 +1022,7 @@ static int erst_clearer(struct pstore_record *record);
14 static struct pstore_info erst_info = {
15 .owner = THIS_MODULE,
16 .name = "erst",
17- .flags = PSTORE_FLAGS_DMESG,
18+ .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG,
19 .open = erst_open_pstore,
20 .close = erst_close_pstore,
21 .read = erst_reader,
22diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
23index e7b9ec6f8a86..7570499b46e0 100644
24--- a/drivers/firmware/efi/efi-pstore.c
25+++ b/drivers/firmware/efi/efi-pstore.c
26@@ -210,7 +210,7 @@ static int efi_pstore_erase(struct pstore_record *record)
27 static struct pstore_info efi_pstore_info = {
28 .owner = THIS_MODULE,
29 .name = KBUILD_MODNAME,
30- .flags = PSTORE_FLAGS_DMESG,
31+ .flags = PSTORE_FLAGS_DMESG | PSTORE_FLAGS_PMSG,
32 .open = efi_pstore_open,
33 .close = efi_pstore_close,
34 .read = efi_pstore_read,