All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [2.6.29-rc2] Inconsistent lock state on resume in hres_timers_resume
Date: Sun, 18 Jan 2009 20:44:20 +0100	[thread overview]
Message-ID: <1232307860.5204.23.camel@laptop> (raw)
In-Reply-To: <200901182232.57186.arvidjaar@mail.ru>

On Sun, 2009-01-18 at 22:32 +0300, Andrey Borzenkov wrote:
> On 18 января 2009 20:25:11 Ingo Molnar wrote:
> 
> > Rafael, can you think of anything in the s2ram code that would have
> >
> > changed the irqs-off status of hres_timers_resume() in this codepath:
> > > > [17854.688347]  [<c013711a>] hres_timers_resume+0xa/0x10
> > > > [17854.688347]  [<c013aa8e>] timekeeping_resume+0xee/0x150
> > > > [17854.688347]  [<c0273384>] __sysdev_resume+0x14/0x50
> > > > [17854.688347]  [<c0273407>] sysdev_resume+0x47/0x80
> > > > [17854.688347]  [<c02791ab>] device_power_up+0xb/0x20
> > > > [17854.688347]  [<c015043f>] suspend_devices_and_enter+0xcf/0x150
> > > > [17854.688347]  [<c0150c2f>] ? freeze_processes+0x3f/0x90
> > > > [17854.688347]  [<c0150614>] enter_state+0xf4/0x140
> > > > [17854.688347]  [<c01506dd>] state_store+0x7d/0xc0
> >
> > ?
> >
> 
> As far as I can tell, timekeeping_resume is called via class ->resume 
> method; and according to comments in sysdev_resume() and 
> device_power_up(), they are called with interrupts disabled.
> 
> Looking at suspend_enter, irqs *are* disabled at this point.
> 
> So it actually looks like something (may be some driver) unconditionally 
> enabled irqs in resume path.
> 
> I believe the patch should be hold back until this is clarified.

Something like so then?

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index c98c31e..53868b8 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -341,13 +341,17 @@ static void __sysdev_resume(struct sys_device *dev)
 	struct sysdev_driver *drv;
 
 	/* First, call the class-specific one */
-	if (cls->resume)
+	if (cls->resume) {
 		cls->resume(dev);
+		WARN(!irqs_disabled(), "%Fp enabled IRQs\n", cls->resume);
+	}
 
 	/* Call auxillary drivers next. */
 	list_for_each_entry(drv, &cls->drivers, entry) {
-		if (drv->resume)
+		if (drv->resume) {
 			drv->resume(dev);
+			WARN(!irqs_disabled(), "%Fp enabled IRQs\n", drv->resume);
+		}
 	}
 }
 



  reply	other threads:[~2009-01-18 19:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18 13:41 [2.6.29-rc2] Inconsistent lock state on resume in hres_timers_resume Andrey Borzenkov
2009-01-18 15:39 ` Peter Zijlstra
2009-01-18 16:23   ` Andrey Borzenkov
2009-01-18 17:25   ` Ingo Molnar
2009-01-18 19:32     ` Andrey Borzenkov
2009-01-18 19:44       ` Peter Zijlstra [this message]
2009-01-18 19:56       ` Ingo Molnar
2009-01-18 20:21         ` Rafael J. Wysocki
2009-01-18 20:31           ` Ingo Molnar
2009-01-18 20:47           ` Andrey Borzenkov
2009-01-18 22:50             ` Rafael J. Wysocki
2009-01-19  0:17             ` Rafael J. Wysocki
2009-01-19  4:22               ` Andrey Borzenkov
2009-01-19  9:51                 ` Rafael J. Wysocki
2009-01-19 18:37                   ` [2.6.29-rc2] ALi USB OHCI enables interrupts during power down in suspend Andrey Borzenkov
     [not found]                     ` <200901192137.25988.arvidjaar-JGs/UdohzUI@public.gmane.org>
2009-01-19 19:13                       ` Rafael J. Wysocki
2009-01-19 19:13                         ` Rafael J. Wysocki
2009-01-19 20:33                         ` Andrey Borzenkov
2009-01-19 20:48                           ` Rafael J. Wysocki
2009-01-19 20:48                             ` Rafael J. Wysocki
2009-01-19 23:45                             ` Ingo Molnar

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=1232307860.5204.23.camel@laptop \
    --to=peterz@infradead.org \
    --cc=arvidjaar@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.