[PATCH 0/2] regmap: Fix lockdep warnings for nested regmap-irqs

Mark Brown posted 2 patches 2 months ago
drivers/base/regmap/regmap-irq.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
[PATCH 0/2] regmap: Fix lockdep warnings for nested regmap-irqs
Posted by Mark Brown 2 months ago
Russell King reported that lockdep warns when it sees nested regmap-irq
interrupt controllers since it defaults to using a single lock class for
all mutexes allocated from a single place in the code.  We end up with
both the parent and child regmap-irq locked simultaneously.  The second
patch here uses an explicit lockdep key to disambiguate things for
regmap, the first adds missing mutex cleanup which I noticed while
writing that patch.

I don't have an affected system so this is written blind, I should
really write some KUnit tests for regmap-irq but didn't yet.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (2):
      regmap: irq: Free the regmap-irq mutex
      regmap: irq: Avoid lockdep warnings with nested regmap-irq chips

 drivers/base/regmap/regmap-irq.c | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)
---
base-commit: 038d61fd642278bab63ee8ef722c50d10ab01e8f
change-id: 20250731-regmap-irq-nesting-40970c711fd2

Best regards,
--  
Mark Brown <broonie@kernel.org>
Re: [PATCH 0/2] regmap: Fix lockdep warnings for nested regmap-irqs
Posted by Mark Brown 2 months ago
On Thu, 31 Jul 2025 21:38:17 +0100, Mark Brown wrote:
> Russell King reported that lockdep warns when it sees nested regmap-irq
> interrupt controllers since it defaults to using a single lock class for
> all mutexes allocated from a single place in the code.  We end up with
> both the parent and child regmap-irq locked simultaneously.  The second
> patch here uses an explicit lockdep key to disambiguate things for
> regmap, the first adds missing mutex cleanup which I noticed while
> writing that patch.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/2] regmap: irq: Free the regmap-irq mutex
      commit: 1da33858af6250184d2ef907494d698af03283de
[2/2] regmap: irq: Avoid lockdep warnings with nested regmap-irq chips
      commit: 76b6e14aa7b081337d118a82397d919b5e072bb4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark