hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/Documentation/admin-guide/ramoops.rst
....@@ -3,7 +3,7 @@
33
44 Sergiu Iordache <sergiu@chromium.org>
55
6
-Updated: 17 November 2011
6
+Updated: 10 Feb 2021
77
88 Introduction
99 ------------
....@@ -30,13 +30,21 @@
3030 depends on atomic operations. At least on ARM, pgprot_noncached causes the
3131 memory to be mapped strongly ordered, and atomic operations on strongly ordered
3232 memory are implementation defined, and won't work on many ARMs such as omaps.
33
+Setting ``mem_type=2`` attempts to treat the memory region as normal memory,
34
+which enables full cache on it. This can improve the performance.
3335
3436 The memory area is divided into ``record_size`` chunks (also rounded down to
35
-power of two) and each oops/panic writes a ``record_size`` chunk of
37
+power of two) and each kmesg dump writes a ``record_size`` chunk of
3638 information.
3739
38
-Dumping both oopses and panics can be done by setting 1 in the ``dump_oops``
39
-variable while setting 0 in that variable dumps only the panics.
40
+Limiting which kinds of kmsg dumps are stored can be controlled via
41
+the ``max_reason`` value, as defined in include/linux/kmsg_dump.h's
42
+``enum kmsg_dump_reason``. For example, to store both Oopses and Panics,
43
+``max_reason`` should be set to 2 (KMSG_DUMP_OOPS), to store only Panics
44
+``max_reason`` should be set to 1 (KMSG_DUMP_PANIC). Setting this to 0
45
+(KMSG_DUMP_UNDEF), means the reason filtering will be controlled by the
46
+``printk.always_kmsg_dump`` boot param: if unset, it'll be KMSG_DUMP_OOPS,
47
+otherwise KMSG_DUMP_MAX.
4048
4149 The module uses a counter to record multiple dumps but the counter gets reset
4250 on restart (i.e. new dumps after the restart will overwrite old ones).
....@@ -90,7 +98,7 @@
9098 .mem_address = <...>,
9199 .mem_type = <...>,
92100 .record_size = <...>,
93
- .dump_oops = <...>,
101
+ .max_reason = <...>,
94102 .ecc = <...>,
95103 };
96104