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

Mark Brown broonie at kernel.org
Thu Aug 22 12:13:34 PDT 2024


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 at 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,
-- 
Mark Brown <broonie at kernel.org>




More information about the maple-tree mailing list