Re: [PATCH v3 1/7] dump_stack: Support adding to the dump stack arch description

From: Sergey Senozhatsky
Date: Thu Feb 07 2019 - 21:01:45 EST


Cc-ing Steven

https://lore.kernel.org/lkml/20190207124635.3885-1-mpe@xxxxxxxxxxxxxx/T/#u

On (02/07/19 23:46), Michael Ellerman wrote:
> Arch code can set a "dump stack arch description string" which is
> displayed with oops output to describe the hardware platform.
>
> It is useful to initialise this as early as possible, so that an early
> oops will have the hardware description.
>
> However in practice we discover the hardware platform in stages, so it
> would be useful to be able to incrementally fill in the hardware
> description as we discover it.
>
> This patch adds that ability, by creating dump_stack_add_arch_desc().
>
> If there is no existing string it behaves exactly like
> dump_stack_set_arch_desc(). However if there is an existing string it
> appends to it, with a leading space.
>
> This makes it easy to call it multiple times from different parts of the
> code and get a reasonable looking result.
>
> Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

You probably can have a __init buffer somewhere in ppc code, append
data to it, step by step, and call dump_stack_set_arch_desc() all
the time.

But no real objections; dump_stack_add_arch_desc() can do.

FWIW,
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>

-ss