From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: Re: [PATCH v3 1/7] dump_stack: Support adding to the dump stack arch description Date: Fri, 8 Feb 2019 11:01:37 +0900 Message-ID: <20190208020137.GA22600@jagdpanzerIV> References: <20190207124635.3885-1-mpe@ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190207124635.3885-1-mpe@ellerman.id.au> Sender: linux-kernel-owner@vger.kernel.org To: Michael Ellerman Cc: linuxppc-dev@ozlabs.org, akpm@linux-foundation.org, tj@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, dyoung@redhat.com, sergey.senozhatsky@gmail.com, pmladek@suse.com, Steven Rostedt List-Id: linux-arch.vger.kernel.org Cc-ing Steven https://lore.kernel.org/lkml/20190207124635.3885-1-mpe@ellerman.id.au/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 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 -ss From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:42185 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbfBHCBm (ORCPT ); Thu, 7 Feb 2019 21:01:42 -0500 Date: Fri, 8 Feb 2019 11:01:37 +0900 From: Sergey Senozhatsky Subject: Re: [PATCH v3 1/7] dump_stack: Support adding to the dump stack arch description Message-ID: <20190208020137.GA22600@jagdpanzerIV> References: <20190207124635.3885-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190207124635.3885-1-mpe@ellerman.id.au> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Michael Ellerman Cc: linuxppc-dev@ozlabs.org, akpm@linux-foundation.org, tj@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, dyoung@redhat.com, sergey.senozhatsky@gmail.com, pmladek@suse.com, Steven Rostedt Message-ID: <20190208020137.L6V1aYA5VGh4hYA_P50-Oych0-45WjqPtMf3nnkQl-A@z> Cc-ing Steven https://lore.kernel.org/lkml/20190207124635.3885-1-mpe@ellerman.id.au/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 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 -ss