Re: [BUG] 6.16-rc7: lockdep failure with max77620-gpio/max77686-rtc
From: Russell King (Oracle)
Date: Thu Jul 31 2025 - 11:58:13 EST
On Thu, Jul 31, 2025 at 02:18:24PM +0100, Mark Brown wrote:
> On Thu, Jul 31, 2025 at 01:43:14PM +0100, Russell King (Oracle) wrote:
> > On Thu, Jul 31, 2025 at 01:31:32PM +0100, Mark Brown wrote:
>
> > > Yes, your analysis is right here - it's not come up before because it's
> > > very rare to chain regmap-irq chips.
>
> > Yep, I just changed all the "d" variables in regmap-irq to "ricd"
> > (first letter of the each word of the struct name), and lockdep
> > confirms that it's the mutex.
>
> > I'm not familiar enough with lockdep to know how to fix this, so what's
> > the solution here?
>
> I *think* mutex_lock_nested() is what we're looking for here, with the
> depth information from the irq_desc but I'm also not super familiar with
> this stuff.
I'm not sure about that, because the irq_desc locks don't nest:
raw_spin_lock_init(&desc->lock);
lockdep_set_class(&desc->lock, &irq_desc_lock_class);
What saves irq_desc lock nesting in this case is that
__irq_put_desc_unlock() unlocks desc->lock calling the
irq_bus_sync_unlock() method. So, I don't think we have anything at
the irq_desc level which deals with lock-nesting.
I guess I'll just ignore the lockdep warning or turn lockdep off,
one or other is probably like everyone else does.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!