Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1208482

Re: [PATCH] gpiolib: irqchip: use different lockdep class for each gpio irqchip

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] gpiolib: irqchip: use different lockdep class for each gpio irqchip
Date 2015-08-17 11:10 +0200
Message-ID <pYoAy-2Ok-3@gated-at.bofh.it> (permalink)
References <pX294-6rZ-11@gated-at.bofh.it> <pXmr7-28w-5@gated-at.bofh.it> <pXmAO-2jP-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 14, 2015 at 2:40 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 08/14/2015 02:34 PM, Linus Walleij wrote:
> [...]
>> Every chip will get their own lock class on the heap.
>>
>> But I think it is a bit kludgy.
>>
>> Is it not possible to have  the lock key in struct gpio_chip
>> be a real member instead of a pointer and get a per-chip
>> lock that way?
>>
>> (...)
>> struct lock_class_key lock_key;
>>
>> instead of:
>>
>> struct lock_class_key  *lock_key;
>>
>> -> problem solved, without kludgy header defines?
>
>
> Lock keys need to be in persistent memory since they have a unlimited life
> time. Once registered it is expected to exist until the system is reset.

Aha I see.

OK if we fix the documentation comment I guess we can go with this,
even if it makes the header file somewhat hard to read.

I have a bit of problem with it, because lockdep instrumentation is
supposed to make development easier, not harder, now it helps
in one end with lock validation and screws up in another end by creating
API headers that are hopeless to read :(

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] gpiolib: irqchip: use different lockdep class for each gpio irqchip Grygorii Strashko <grygorii.strashko@ti.com> - 2015-08-13 17:00 +0200
  Re: [PATCH] gpiolib: irqchip: use different lockdep class for each  gpio irqchip Roger Quadros <rogerq@ti.com> - 2015-08-14 11:10 +0200
  Re: [PATCH] gpiolib: irqchip: use different lockdep class for each  gpio irqchip Linus Walleij <linus.walleij@linaro.org> - 2015-08-14 14:40 +0200
    Re: [PATCH] gpiolib: irqchip: use different lockdep class for each  gpio irqchip Lars-Peter Clausen <lars@metafoo.de> - 2015-08-14 14:50 +0200
      Re: [PATCH] gpiolib: irqchip: use different lockdep class for each  gpio irqchip Grygorii Strashko <grygorii.strashko@ti.com> - 2015-08-14 15:10 +0200
      Re: [PATCH] gpiolib: irqchip: use different lockdep class for each  gpio irqchip Linus Walleij <linus.walleij@linaro.org> - 2015-08-17 11:10 +0200
    Re: [PATCH] gpiolib: irqchip: use different lockdep class for each  gpio irqchip Grygorii Strashko <grygorii.strashko@ti.com> - 2015-08-17 11:50 +0200

csiph-web