All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>,
	Pavel Machek <pavel@ucw.cz>, Len Brown <lenb@kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: ACPI lockdep warning on boot, 2.6.25-rc5
Date: Fri, 18 Apr 2008 12:24:20 +0200	[thread overview]
Message-ID: <1208514260.7115.73.camel@twins> (raw)
In-Reply-To: <200803192151.59720.rjw@sisk.pl>

On Wed, 2008-03-19 at 21:51 +0100, Rafael J. Wysocki wrote:
> On Wednesday, 19 of March 2008, Venki Pallipadi wrote:
> > On Sat, Mar 15, 2008 at 02:16:11PM +0100, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > @@ -421,7 +423,9 @@
> > > >  		else
> > > >  			acpi_safe_halt();
> > > >  
> > > > -		local_irq_enable();
> > > > +		if (irqs_disabled())
> > > > +			local_irq_enable();
> > > > +
> > > >  		return;
> > > >  	}
> > > >  
> > > > @@ -530,7 +534,9 @@
> > > >  		 *       skew otherwise.
> > > >  		 */
> > > >  		sleep_ticks = 0xFFFFFFFF;
> > > > -		local_irq_enable();
> > > > +		if (irqs_disabled())
> > > > +			local_irq_enable();
> > > > +
> > > >  		break;
> > > >  
> > > >  	case ACPI_STATE_C2:
> > > 
> > > That's pretty ugly. Could the code be modified to have interrupt
> > > consistent at this point?
> > > 
> > 
> > Agreed that this is not very clean. The problem is that we cannot be sure
> > about the interrupt state at this point as the low level idle handlers at
> > this point can come from variety of different places like safe_halt, arch
> > dependent pm_idle code (which is different for (32 and 64 bit at this point)
> > and also pm_idle can be somewhere outside the kernel in some module as it is
> > a function pointer.
> 
> Well, I'd add a comment that this is to make lockdep happy.  Otherwise it looks
> bizarre.

I'd suggest to clean up the source of this mess instead; this is quite
horrible.

      reply	other threads:[~2008-04-18 10:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 10:33 ACPI lockdep warning on boot, 2.6.25-rc5 Miklos Szeredi
2008-03-12 22:01 ` Rafael J. Wysocki
2008-03-13 20:14   ` Len Brown
2008-03-14  0:18     ` Venki Pallipadi
2008-03-14  4:07       ` Len Brown
2008-03-15 13:16       ` Pavel Machek
2008-03-19 20:09         ` Venki Pallipadi
2008-03-19 20:51           ` Rafael J. Wysocki
2008-04-18 10:24             ` Peter Zijlstra [this message]

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=1208514260.7115.73.camel@twins \
    --to=peterz@infradead.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=venkatesh.pallipadi@intel.com \
    /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.