lkml.org 
[lkml]   [2008]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2.6.25-rc3] lockdep: add spin_lock_irq_nested()
> 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.000000000 -0800
> +++ b/arch/arm/plat-omap/gpio.c 2008-02-25 10:54:29.000000000 -0800
> @@ -1332,6 +1332,28 @@ static struct clk *gpio_fclks[OMAP34XX_N
> static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS];
> #endif
>
> +#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
> +
> +
> static int __init _omap_gpio_init(void)
> {
> int i;
> @@ -1532,6 +1554,7 @@ static int __init _omap_gpio_init(void)
> set_irq_chip(j, &gpio_irq_chip);
> set_irq_handler(j, handle_simple_irq);
> set_irq_flags(j, IRQF_VALID);
> + mark_gpio_locking(i);

should be mark_gpio_locking(j).

That's an off-by-one error in ASCII or QWERTY (adjacency), and
in terms of typefaces it's a few pixels. Sigh.

Since that seems to behave, I'll send along a couple patches
like this ... unless you say this isn't really, after all, the
right way to address this problem. Note that neither IRQ has
ever been triggered at this point ... I'll move the marking up
a bit to ensure the lock has never been taken either.

- Dave


> }
> set_irq_chained_handler(bank->irq, gpio_irq_handler);
> set_irq_data(bank->irq, bank);
>


\
 
 \ /
  Last update: 2008-02-25 23:37    [W:0.678 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site