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

Liam R. Howlett liam at infradead.org
Mon Oct 5 08:49:35 PDT 2026


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 at gmail.com>
> > 
> > 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





More information about the maple-tree mailing list