Skip to content

Commit

Permalink
ramoops: Add "max-reason" optional field to ramoops DT node
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
soleen authored and kees committed May 30, 2020
1 parent 791205e commit acf12c5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Documentation/devicetree/bindings/reserved-memory/ramoops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Optional properties:
- ecc-size: enables ECC support and specifies ECC buffer size in bytes
(defaults to 0: no ECC)

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

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

- no-dump-oops: if present, only dump panics (defaults to panics and oops)
- max-reason: if present, sets maximum type of kmsg dump reasons to store
(defaults to 2: log Oopses and Panics). This can be set to INT_MAX to
store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other
kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the
reason filtering will be controlled by the printk.always_kmsg_dump boot
param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX.

- no-dump-oops: deprecated, use max_reason instead. If present, and
max_reason is not specified, it is equivalent to max_reason = 1
(KMSG_DUMP_PANIC).

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

0 comments on commit acf12c5

Please sign in to comment.