LKML Archive on
help / color / mirror / Atom feed
From: Peter Zijlstra <>
To: David Brownell <>
Cc: Linux Kernel list <>,
Subject: Re: [patch 2.6.25-rc3] lockdep:  add spin_lock_irq_nested()
Date: Mon, 25 Feb 2008 11:20:28 +0100	[thread overview]
Message-ID: <1203934828.6242.140.camel@lappy> (raw)
In-Reply-To: <>

On Sun, 2008-02-24 at 20:33 -0800, David Brownell wrote:
> > > >     ==> LOCKDEP feature is evidently missing:
> > > >             spin_lock_irq_nested(lock_ptr, lock_class)
> > > 
> > > This rant is more lines than adding the API :-/ the reason for it not
> > > being there is simple, it wasn't needed up until now.
> > 
> > I suspected that was the case, but for all I knew there was some
> > religious objection. 
> Does this look about right?  Or, I suppose it could just call
> the _spin_lock_irqsave_nested() routine and discard the result.

Before I look at the code, and with a notice that I haven't had my
morning juice yet...

It seems to me a spin_lock_irq_nested() thing is redundant, because:

The lock must obviously be held hardirq safe and nested implies one is
already held. Hence the context is already hardirq safe thus using
spin_lock_irq/spin_unlock_irq is wrong because it will enable irqs and
destroy the irqsafe guarantee for the parent lock.

Obviously I'm missing something here.. otherwise you wouldn't need it.

As I'm very much not familiar with the IRQ code, could you spell it out
to me?

  reply	other threads:[~2008-02-25 10:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 22:29 [patch/rfc 2.6.24-rc8-git] genirq: partial lockdep fixes David Brownell
2008-01-21  8:31 ` Peter Zijlstra
2008-01-21 18:22   ` David Brownell
2008-02-25  4:33     ` [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested() David Brownell
2008-02-25 10:20       ` Peter Zijlstra [this message]
2008-02-25 11:21         ` David Brownell
2008-02-25 13:17           ` Peter Zijlstra
2008-02-25 21:10             ` David Brownell
2008-02-25 22:33 David Brownell
2008-02-26  9:53 ` Peter Zijlstra
2008-02-26 10:36   ` David Brownell

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1203934828.6242.140.camel@lappy \ \ \ \ \
    --subject='Re: [patch 2.6.25-rc3] lockdep:  add spin_lock_irq_nested()' \

* 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).