LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>,
	lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Russell King <rmk@arm.linux.org.uk>,
	Nicolas Ferre <nicolas.ferre@rfo.atmel.com>,
	Andrew Victor <linux@maxim.org.za>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 2.6.28-rc2] at91_mci: workaround lockdep
Date: Tue, 28 Oct 2008 10:22:42 -0700	[thread overview]
Message-ID: <200810281022.42803.david-b@pacbell.net> (raw)
In-Reply-To: <1225213442.15763.20.camel@lappy.programming.kicks-ass.net>

On Tuesday 28 October 2008, Peter Zijlstra wrote:
> On Mon, 2008-10-27 at 14:26 -0700, David Brownell wrote:
> > From: David Brownell <dbrownell@users.sourceforge.net>
> > 
> > Lockdep reported a problem in the at91_mci driver ... in this case, the
> > issue is with lockdep, not with the driver. ...
> > 
> > When __flush_dcache_aliases() returns -- inlined into flush_dcache_page(),
> > above -- it re-enables IRQs ... since that evidently may only be called with
> > IRQs enabled.  That's OK since the (unshared) IRQ handler doesn't ask for IRQs
> > to be disabled.   Except ... that lockdep went and disabled them, then went on
> > to complains about the breakage *it* caused!
> > 
> > Workaround: depend on LOCKDEP=n ... 
> 
> In all previous such cases it was deemed the IRQ handler should deal
> with whatever it gets.

In which case I'll wait until someone changes that IRQ handler (or that
ARM MM utility, or lockdep), and give up using AT91 platforms for sanity
testing kernel changes; lockdep is important, when it doesn't lie.

I do think that lockdep should warn when that it's ignoring such driver
requests, however.  I seem to have been tripping over it a lot lately,
and knowing that IRQ handlers were using strange modes would have saved
a bunch of time from being wasted.

Threaded IRQ handlers are going to need to rely even more on running
with IRQs enabled ... not to mention needing to sleep.  So it's clear
to me that there *are* lockdep issues yet to be adressed here.

- Dave


  reply	other threads:[~2008-10-28 17:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 21:26 David Brownell
2008-10-28 17:04 ` Peter Zijlstra
2008-10-28 17:22   ` David Brownell [this message]
2008-10-28 17:36     ` Peter Zijlstra
2008-10-28 19:41       ` David Brownell
2008-10-29  7:20     ` David Brownell
2008-11-03 13:47     ` Nicolas Ferre
2008-11-17  9:28 ` Nicolas Ferre
2008-11-19 18:45   ` Pierre Ossman
2008-11-20 15:02     ` Nicolas Ferre
2008-11-20 15:42       ` Pierre Ossman
2008-11-23 14:26   ` 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=200810281022.42803.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=drzeus-mmc@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@maxim.org.za \
    --cc=mingo@elte.hu \
    --cc=nicolas.ferre@rfo.atmel.com \
    --cc=peterz@infradead.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    --subject='Re: [patch 2.6.28-rc2] at91_mci: workaround lockdep' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).