[alsa-devel] [RFC PATCH 1/2] regmap: add configurable lock class key for lockdep
Mark Brown
broonie at kernel.org
Mon Jun 29 17:32:56 CEST 2015
On Mon, Jun 29, 2015 at 07:35:20AM -0700, Arjan van de Ven wrote:
> lockdep assumes that there is a known lock hierarchy, at least known
> to the developer.
> seems like for regmap there isn't
It's not that there's no heirachy of locks, it's that lockdep is unable
to understand what's going on since it's making simplifying assumptions
that just aren't true. If I remember the problem correctly it's
grouping all locks allocated in the same place into one class which
doesn't work at all for scenarios where you've got a generic interface
providing services to many devices which may be stacked on top of each
other.
> (I would be interested to know how you avoid ABBA deadlocks btw,
> can you have 2 devices, one with a hierarchy one way, and another
> with the hierarchy the other way?)
I'm not sure I fully understand what you mean here, sorry - do you mean
in terms of classes or individual devices? The relationships between
devices are all device and system defined, individual regmaps should be
treated as separate classes. From this perspective it's basically
eqivalent to asking how the mutex code avoids misuse of mutexes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150629/9940bb4b/attachment.sig>
More information about the Alsa-devel
mailing list