Skip to content

Commit acf12c5

Browse files
soleenkees
authored andcommitted
ramoops: Add "max-reason" optional field to ramoops DT node
Currently, it is only possible to get kmsg dumps for panic and oops, or just panic, via "no-dump-oops". With "max-reason" it is possible to dump messages for other kmsg_dump events, for example emerg and shutdown. Signed-off-by: Pavel Tatashin <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Kees Cook <[email protected]>
1 parent 791205e commit acf12c5

File tree

1 file changed

+11
-2
lines changed
  • Documentation/devicetree/bindings/reserved-memory

1 file changed

+11
-2
lines changed

Documentation/devicetree/bindings/reserved-memory/ramoops.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Optional properties:
3030
- ecc-size: enables ECC support and specifies ECC buffer size in bytes
3131
(defaults to 0: no ECC)
3232

33-
- record-size: maximum size in bytes of each dump done on oops/panic
33+
- record-size: maximum size in bytes of each kmsg dump.
3434
(defaults to 0: disabled)
3535

3636
- console-size: size in bytes of log buffer reserved for kernel messages
@@ -45,7 +45,16 @@ Optional properties:
4545
- unbuffered: if present, use unbuffered mappings to map the reserved region
4646
(defaults to buffered mappings)
4747

48-
- no-dump-oops: if present, only dump panics (defaults to panics and oops)
48+
- max-reason: if present, sets maximum type of kmsg dump reasons to store
49+
(defaults to 2: log Oopses and Panics). This can be set to INT_MAX to
50+
store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other
51+
kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the
52+
reason filtering will be controlled by the printk.always_kmsg_dump boot
53+
param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX.
54+
55+
- no-dump-oops: deprecated, use max_reason instead. If present, and
56+
max_reason is not specified, it is equivalent to max_reason = 1
57+
(KMSG_DUMP_PANIC).
4958

5059
- flags: if present, pass ramoops behavioral flags (defaults to 0,
5160
see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).

0 commit comments

Comments
 (0)