From: Andrew Morton <akpm@linux-foundation.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] Support resetting WARN_ONCE for all architectures
Date: Fri, 3 Nov 2017 10:47:55 -0700 [thread overview]
Message-ID: <20171103104755.0fa2dba59f48df43d5bffb25@linux-foundation.org> (raw)
In-Reply-To: <878tfn7ldw.fsf@concordia.ellerman.id.au>
On Fri, 03 Nov 2017 20:38:03 +1100 Michael Ellerman <mpe@ellerman.id.au> wrote:
> Hi Andi,
>
> Thanks for making it work with the flag, but ...
>
> Andi Kleen <andi@firstfloor.org> writes:
> > diff --git a/lib/bug.c b/lib/bug.c
> > index a6a1137d06db..7cb2d41845f7 100644
> > --- a/lib/bug.c
> > +++ b/lib/bug.c
> > @@ -195,3 +195,24 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
> >
> > return BUG_TRAP_TYPE_BUG;
> > }
> > +
> > +static void clear_once_table(struct bug_entry *start, struct bug_entry *end)
> > +{
> > + struct bug_entry *bug;
> > +
> > + for (bug = start; bug < end; bug++)
> > + bug->flags &= ~BUGFLAG_ONCE;
>
> Clearing BUGFLAG_ONCE removes the once-ness permanently. ie. it becomes
> a WARN().
>
> You should be clearing BUGFLAG_DONE, which is the flag that says this
> WARN has already triggered.
This?
--- a/lib/bug.c~support-resetting-warn_once-for-all-architectures-v2-fix-fix-fix
+++ a/lib/bug.c
@@ -202,7 +202,7 @@ static void clear_once_table(struct bug_
struct bug_entry *bug;
for (bug = start; bug < end; bug++)
- bug->flags &= ~BUGFLAG_ONCE;
+ bug->flags &= ~BUGFLAG_DONE;
}
void generic_bug_clear_once(void)
And this is getting a bit nutty:
support-resetting-warn_once.patch
support-resetting-warn_once-checkpatch-fixes.patch
support-resetting-warn_once-for-all-architectures.patch
support-resetting-warn_once-for-all-architectures-v2.patch
support-resetting-warn_once-for-all-architectures-v2-fix.patch
support-resetting-warn_once-for-all-architectures-v2-fix-fix.patch
support-resetting-warn_once-for-all-architectures-v2-fix-fix-fix.patch
I'll push all this at Stephen later today. Someone please tell me
whether this code actually works!
next prev parent reply other threads:[~2017-11-03 17:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 20:46 Andi Kleen
2017-11-03 9:38 ` Michael Ellerman
2017-11-03 17:47 ` Andrew Morton [this message]
2017-11-06 0:18 ` Michael Ellerman
2017-11-06 21:36 ` Andi Kleen
2017-11-08 9:40 ` Michael Ellerman
2017-10-20 17:06 Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171103104755.0fa2dba59f48df43d5bffb25@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome