mbox series

[0/5] regmap: Improve lock handling with maple tree

Message ID 20240822-b4-regmap-maple-nolock-v1-0-d5e6dbae3396@kernel.org (mailing list archive)
Headers show
Series regmap: Improve lock handling with maple tree | expand

Message

Mark Brown Aug. 22, 2024, 7:13 p.m. UTC
The lockdep asserts in the maple tree code and the double locking that
we're doing continue to cause issues, most recently some warnings
reported by Cristian Ciocaltea due to dynamic cache allocations in
interrupt context (which are an issue in themselves, but still).  Let's
start trying to improve the situation by configuring the regmap lock as
an external lock for maple tree, allowing it to do it's asserts without
having a separate lock.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (5):
      maple_tree: Allow external locks to be configured with their map
      regmap: Hold the regmap lock when allocating and freeing the cache
      regmap: Use locking during kunit tests
      regmap: Wrap maple tree locking
      regmap: Don't double lock maple cache when using a regmap provided lock

 drivers/base/regmap/internal.h       | 12 +++++++++++
 drivers/base/regmap/regcache-maple.c | 41 +++++++++++++++++++++++++++---------
 drivers/base/regmap/regcache.c       |  4 ++++
 drivers/base/regmap/regmap-kunit.c   |  2 --
 drivers/base/regmap/regmap.c         |  5 +++++
 include/linux/maple_tree.h           |  3 +++
 6 files changed, 55 insertions(+), 12 deletions(-)
---
base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba
change-id: 20240814-b4-regmap-maple-nolock-11408d2d0d41

Best regards,