[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160223121421.GA4024@osiris>
Date: Tue, 23 Feb 2016 13:14:21 +0100
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
Prarit Bhargava <prarit@...hat.com>
Subject: Re: [PATCH] lib/bug.c: use common WARN helper
On Mon, Feb 22, 2016 at 09:54:17PM -0600, Josh Poimboeuf wrote:
> The traceoff_on_warning option doesn't have any effect on s390, powerpc,
> arm64, parisc, and sh because there are two different types of WARN
> implementations:
>
> 1) The above mentioned architectures treat WARN() as a special case of a
> BUG() exception. They handle warnings in report_bug() in lib/bug.c.
>
> 2) All other architectures just call warn_slowpath_*() directly. Their
> warnings are handled in warn_slowpath_common() in kernel/panic.c.
>
> Support traceoff_on_warning on all architectures and prevent any future
> divergence by using a single common function to emit the warning.
>
> Also remove the '()' from '%pS()', because the parentheses look funky:
>
> [ 45.607629] WARNING: at /root/warn_mod/warn_mod.c:17 .init_dummy+0x20/0x40 [warn_mod]()
>
> Reported-by: Chunyu Hu <chuhu@...hat.com>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
> ---
> Based on linux-next/master.
>
> include/asm-generic/bug.h | 7 +++++++
> kernel/panic.c | 44 +++++++++++++++++++++++++-------------------
> lib/bug.c | 27 +++------------------------
> 3 files changed, 35 insertions(+), 43 deletions(-)
Nice! Just tested this on s390.
Acked-by: Heiko Carstens <heiko.carstens@...ibm.com>
Powered by blists - more mailing lists