From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
Linux-OMAP <linux-omap@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Sekhar Nori <nsekhar@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH] gpiolib: irqchip: use different lockdep class for each gpio irqchip
Date: Fri, 14 Aug 2015 16:05:52 +0300 [thread overview]
Message-ID: <55CDE7B0.5040108@ti.com> (raw)
In-Reply-To: <55CDE1BB.1060708@metafoo.de>
On 08/14/2015 03:40 PM, Lars-Peter Clausen 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.
>
> We recently fixed the same issue of nested locks in regmap. For reference
> the discussion with had a look at different ways to solve this can be found
> here[1] and the final patch series that went in here[2].
>
> - Lars
>
> [1] https://lkml.org/lkml/2015/6/25/144
> [2] https://lkml.org/lkml/2015/7/8/43
I've actually followed [2], but without deep digging in Lock keys anatomy :)
(as mentioned in commit message)
--
regards,
-grygorii
next prev parent reply other threads:[~2015-08-14 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 14:58 [PATCH] gpiolib: irqchip: use different lockdep class for each gpio irqchip Grygorii Strashko
2015-08-14 9:00 ` Roger Quadros
2015-08-14 12:34 ` Linus Walleij
2015-08-14 12:40 ` Lars-Peter Clausen
2015-08-14 13:05 ` Grygorii Strashko [this message]
2015-08-17 9:06 ` Linus Walleij
2015-08-17 9:40 ` Grygorii Strashko
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55CDE7B0.5040108@ti.com \
--to=grygorii.strashko@ti.com \
--cc=geert@linux-m68k.org \
--cc=gnurou@gmail.com \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=rogerq@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).