blob: 11b67cbb92a87921915b410d588973e466b1b161 [file] [log] [blame]
Lorenz Brund842aaf2025-02-17 17:39:46 +01001From 9558d3ae7a94a56e64e1ba00469b21c721323d0c Mon Sep 17 00:00:00 2001
2From: Lorenz Brun <lorenz@monogon.tech>
3Date: Mon, 29 Jan 2024 22:17:13 +0100
4Subject: [PATCH] drivers: pstore: enable pmsg for ERST and EFI backends
5
6This enables pstore for userspace messages for the ACPI ERST as well as
7the EFI variable pstore backend, both of which are expected to be used
8frequently with Metropolis. We need that to reliably store panics of
9core processes regardless of the system state. This is not enabled
10upstream, either because pmsg was a later addition to pstore or for
11concerns of accidentally running out of pstore space. We work around
12the limited space issue by always clearing pstore after every boot, so
13this 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 Brund1f82e92024-02-08 19:27:46 +010018
19diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
20index 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,
32diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
Lorenz Brund842aaf2025-02-17 17:39:46 +010033index 552c78f5f059..9e5651fd1439 100644
Lorenz Brund1f82e92024-02-08 19:27:46 +010034--- a/drivers/firmware/efi/efi-pstore.c
35+++ b/drivers/firmware/efi/efi-pstore.c
Lorenz Brund842aaf2025-02-17 17:39:46 +010036@@ -245,7 +245,7 @@ static int efi_pstore_erase(struct pstore_record *record)
Lorenz Brund1f82e92024-02-08 19:27:46 +010037 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 Brund842aaf2025-02-17 17:39:46 +010045--
462.47.2
47