Message ID | 20200505154510.93506-6-pasha.tatashin@soleen.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | allow ramoops to collect all kmesg_dump events | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success |
On Tue, May 05, 2020 at 11:45:10AM -0400, Pavel Tatashin wrote: > Currently, it is possible to dump kmsges for panic, or oops. > With max_reason it is possible to dump messages for other > kmesg_dump events, for example reboot, halt, shutdown, kexec. > > Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> > --- > .../devicetree/bindings/reserved-memory/ramoops.txt | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > index 0eba562fe5c6..886cff15d822 100644 > --- a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > +++ b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > @@ -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 > @@ -45,7 +45,13 @@ 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: maximum reason for kmsg dump. Defaults to 2 (dump oops and max-reason > + panics). Can be set to INT_MAX to dump for all reasons. See > + include/linux/kmsg_dump.h KMSG_DUMP_* for other kmsg dump values. > + > +- no-dump-oops: deprecated, use max_reason instead. > + if present, and max_reason is not specified 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). > -- > 2.25.1 >
On Tue, May 12, 2020 at 09:42:30PM -0500, Rob Herring wrote: > On Tue, May 05, 2020 at 11:45:10AM -0400, Pavel Tatashin wrote: > > Currently, it is possible to dump kmsges for panic, or oops. > > With max_reason it is possible to dump messages for other > > kmesg_dump events, for example reboot, halt, shutdown, kexec. > > > > Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> > > --- > > .../devicetree/bindings/reserved-memory/ramoops.txt | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > > index 0eba562fe5c6..886cff15d822 100644 > > --- a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > > +++ b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > > @@ -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 > > @@ -45,7 +45,13 @@ 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: maximum reason for kmsg dump. Defaults to 2 (dump oops and > > max-reason Thanks! I caught this in later versions, so it's correct now. :) -Kees
diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt index 0eba562fe5c6..886cff15d822 100644 --- a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt +++ b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt @@ -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 @@ -45,7 +45,13 @@ 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: maximum reason for kmsg dump. Defaults to 2 (dump oops and + panics). Can be set to INT_MAX to dump for all reasons. See + include/linux/kmsg_dump.h KMSG_DUMP_* for other kmsg dump values. + +- no-dump-oops: deprecated, use max_reason instead. + if present, and max_reason is not specified 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).
Currently, it is possible to dump kmsges for panic, or oops. With max_reason it is possible to dump messages for other kmesg_dump events, for example reboot, halt, shutdown, kexec. Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> --- .../devicetree/bindings/reserved-memory/ramoops.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)