[PATCH RFC] regmap: maple: Switch to use irq-safe locking

Mark Brown broonie at kernel.org
Wed Aug 14 12:25:06 PDT 2024


On Wed, Aug 14, 2024 at 08:04:07PM +0100, Mark Brown wrote:

> My first thought here is that if we've got a regmap using spinlocks for
> the regmap lock and a maple tree cache we should arrange things so that
> the maple tree lock is used for the regmap's lock.  That would however
> involve some unpleasant abstraction violation, and possibly some macro
> fun since we'd need to elide the locking from the cache itself when
> using the same lock at the regmap level.  I think that's going to be a
> case of choosing the least unpleasant option.

Actually I think that modulo issues with devices that disable regmap
level locking entirely or use hwspinlocks we can persuade the cache to
always use the regmap level lock, even for mutexes, which might clean up
the code a bit and would avoid the double locking for the common case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20240814/2d779e61/attachment.sig>


More information about the Linux-rockchip mailing list