Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-26 Thread David Brownell
On Tuesday 26 February 2008, Peter Zijlstra wrote: > > On Mon, 2008-02-25 at 14:33 -0800, David Brownell wrote: > > > > +#ifdef CONFIG_LOCKDEP > > > + > > > +/* tell lockdep that this IRQ's locks and its parent's locks are in > > > + * different categories, so that it won't detect false recursion

Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-26 Thread Peter Zijlstra
On Mon, 2008-02-25 at 14:33 -0800, David Brownell wrote: > > +#ifdef CONFIG_LOCKDEP > > + > > +/* tell lockdep that this IRQ's locks and its parent's locks are in > > + * different categories, so that it won't detect false recursion. > > + */ > > +static struct lock_class_key gpio_lock_class; > >

Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-25 Thread David Brownell
> So I'm think that the reason this only _changes_ the false > recursion notification ... Whoops, it's because of the following typo: > --- a/arch/arm/plat-omap/gpio.c 2008-02-24 19:02:32.0 -0800 > +++ b/arch/arm/plat-omap/gpio.c 2008-02-25 10:54:29.0 -0800 > @@ -1332,

Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-25 Thread David Brownell
> > I thought the way to use the *_nested() calls was "consistently"! > > Very much depends on your view of consistent :-) > > > That is, if one instance of a lock access uses it, they all should, > > since that's the only way lockdep learns about equivalence classes. > > Also, locks shouldn't move

Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-25 Thread Peter Zijlstra
On Mon, 2008-02-25 at 03:21 -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

Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-25 Thread David Brownell
> > > > > ==> 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

Re: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-25 Thread Peter Zijlstra
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 ne

[patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()

2008-02-24 Thread David Brownell
> > > ==> 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