lkml.org 
[lkml]   [2008]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()
From
Date

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;
> > +
> > +static inline void mark_gpio_locking(unsigned gpio_irq)
> > +{
> > + lockdep_set_class(&irq_desc[gpio_irq].lock, &gpio_lock_class);
> > +}
> > +
> > +#else
> > +
> > +static inline void mark_gpio_locking(unsigned gpio_irq)
> > +{
> > + /* NOP */
> > +}
> > +
> > +#endif

Glad to hear this works out for you.

Just one note, you don't need the #ifdef mess here. struct
lock_class_key is 0 bytes on !LOCKDEP and lockdep_set_class*() is
defined away as well.




\
 
 \ /
  Last update: 2008-02-26 10:57    [W:0.239 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site