From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Pavel Machek <pavel@ucw.cz>,
linux-kernel@vger.kernel.org
Subject: Re: suspend-related lockdep warning
Date: Thu, 6 Dec 2007 13:04:09 +0100 [thread overview]
Message-ID: <20071206120409.GB26686@elte.hu> (raw)
In-Reply-To: <20071206040102.c6b8e9b0.akpm@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> wrote:
> It would be nice to make that warning tell us that - we've hit it a
> few times and I never knew this was the reason.
i'm a mind-reader and a time-traveler as well, so i've got the patch
below lined up in my sched.git queue already :-)
Ingo
-------------->
Subject: lockdep: make cli/sti annotation warnings clearer
From: Ingo Molnar <mingo@elte.hu>
make cli/sti annotation warnings easier to interpret.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
kernel/lockdep.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
Index: linux/kernel/lockdep.c
===================================================================
--- linux.orig/kernel/lockdep.c
+++ linux/kernel/lockdep.c
@@ -2654,10 +2654,15 @@ static void check_flags(unsigned long fl
if (!debug_locks)
return;
- if (irqs_disabled_flags(flags))
- DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled);
- else
- DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled);
+ if (irqs_disabled_flags(flags)) {
+ if (DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)) {
+ printk("possible reason: unannotated irqs-off.\n");
+ }
+ } else {
+ if (DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled)) {
+ printk("possible reason: unannotated irqs-on.\n");
+ }
+ }
/*
* We dont accurately track softirq state in e.g.
next prev parent reply other threads:[~2007-12-06 12:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 10:43 suspend-related lockdep warning Andrew Morton
2007-11-28 22:06 ` Rafael J. Wysocki
2007-12-01 8:33 ` Pavel Machek
2007-12-02 20:33 ` Rafael J. Wysocki
2007-12-03 6:26 ` Andrew Morton
2007-12-03 22:34 ` Rafael J. Wysocki
2007-12-04 1:45 ` Andrew Morton
2007-12-06 0:21 ` Rafael J. Wysocki
2007-12-06 10:31 ` Peter Zijlstra
2007-12-06 12:01 ` Andrew Morton
2007-12-06 12:04 ` Ingo Molnar [this message]
2007-12-06 12:04 ` Peter Zijlstra
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=20071206120409.GB26686@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/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