summaryrefslogtreecommitdiffstats
path: root/drivers/platform/chrome/chromeos_pstore.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-05-13 14:35:03 -0700
committerKees Cook <keescook@chromium.org>2020-05-30 10:34:03 -0700
commit791205e3ec6081a8da6f00621e3453d622dc41e7 (patch)
tree840bdcf480412bd162005b70d4609e31c33087da /drivers/platform/chrome/chromeos_pstore.c
parent3524e688b8ee50b0edc76f0e020727eb6c684dbc (diff)
downloadlinux-stable-791205e3ec6081a8da6f00621e3453d622dc41e7.tar.gz
linux-stable-791205e3ec6081a8da6f00621e3453d622dc41e7.tar.bz2
linux-stable-791205e3ec6081a8da6f00621e3453d622dc41e7.zip
pstore/ram: Introduce max_reason and convert dump_oops
Now that pstore_register() can correctly pass max_reason to the kmesg dump facility, introduce a new "max_reason" module parameter and "max-reason" Device Tree field. The "dump_oops" module parameter and "dump-oops" Device Tree field are now considered deprecated, but are now automatically converted to their corresponding max_reason values when present, though the new max_reason setting has precedence. For struct ramoops_platform_data, the "dump_oops" member is entirely replaced by a new "max_reason" member, with the only existing user updated in place. Additionally remove the "reason" filter logic from ramoops_pstore_write(), as that is not specifically needed anymore, though technically this is a change in behavior for any ramoops users also setting the printk.always_kmsg_dump boot param, which will cause ramoops to behave as if max_reason was set to KMSG_DUMP_MAX. Co-developed-by: Pavel Tatashin <pasha.tatashin@soleen.com> Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> Link: https://lore.kernel.org/lkml/20200515184434.8470-6-keescook@chromium.org/ Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/platform/chrome/chromeos_pstore.c')
-rw-r--r--drivers/platform/chrome/chromeos_pstore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/chromeos_pstore.c b/drivers/platform/chrome/chromeos_pstore.c
index d13770785fb5..fa51153688b4 100644
--- a/drivers/platform/chrome/chromeos_pstore.c
+++ b/drivers/platform/chrome/chromeos_pstore.c
@@ -57,7 +57,7 @@ static struct ramoops_platform_data chromeos_ramoops_data = {
.record_size = 0x40000,
.console_size = 0x20000,
.ftrace_size = 0x20000,
- .dump_oops = 1,
+ .max_reason = KMSG_DUMP_OOPS,
};
static struct platform_device chromeos_ramoops = {