Re: [PATCH v2 2/2] regmap: Drop map lock during cache init and exit

From: Liam R. Howlett

Date: Mon Oct 05 2026 - 11:56:19 EST


On 26/10/05 02:03PM, Mark Brown wrote:
> On Sun, Oct 04, 2026 at 11:38:43PM +1100, Michael Reeves via B4 Relay wrote:
> > From: Michael Reeves <michael.reeves077@xxxxxxxxx>
> >
> > On systems with CONFIG_PROVE_RAW_LOCK_NESTING enabled, Apple GPIO probe
> > triggers an "Invalid wait context" lockdep warning.
>
> > - mas_lock(&mas);
> > + spin_lock_irqsave(&mt->ma_lock, flags);
>
> I think this needs at least a comment explaining why we're not using
> mas_lock(), otherwise people will try to change to using mas_lock()
> since there's no obvious reason we need to exclude interrupts and we're
> peering inside the maple tree internals.

An irqsave mas_lock() should be added to the maple_tree.h for others to
use. We probably still need the comment Mark suggested as well.

Michael, can you please add the irqsave variant to the header and Cc me
on the change?

Thanks,
Liam