[PATCH v5 0/2] regcache: Avoid accessing non-initialised cache

Andy Shevchenko posted 2 patches 1 month, 1 week ago
There is a newer version of this series
drivers/base/regmap/regcache.c | 46 +++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 17 deletions(-)
[PATCH v5 0/2] regcache: Avoid accessing non-initialised cache
Posted by Andy Shevchenko 1 month, 1 week ago
Refactor regcache flow that populates cache on initialisation phase
based on the values in HW. This makes code robust against any possible
accesses to not-fully initialised caches.

Changelog v5:
- added a precursor patch to make things clearer
- also put the freeing resources into an order (Mark)
- dropped applied patches

v4: 20260302095847.2310066-1-andriy.shevchenko@linux.intel.com

Changelog v4:
- made conditional against 'count' to make it less dependent to the previous code path

v3: 20260226135918.381979-1-andriy.shevchenko@linux.intel.com

Changelog v3:
- dropped unneeded churn in patch 3 (Mark)
- fixed code to pass kunit test cases (Mark)

v2: 20260225161659.3811671-1-andriy.shevchenko@linux.intel.com

Changelog v2:
- rebased on top of the latest regmap changes (Mark)
- added two more little cleanups (patches 4 & 5)

Andy Shevchenko (2):
  regcache: Factor out regcache_hw_exit() helper
  regcache: Move HW readback after cache initialisation

 drivers/base/regmap/regcache.c | 46 +++++++++++++++++++++-------------
 1 file changed, 29 insertions(+), 17 deletions(-)

-- 
2.50.1
Re: [PATCH v5 0/2] regcache: Avoid accessing non-initialised cache
Posted by Mark Brown 1 month, 1 week ago
On Tue, 03 Mar 2026 10:26:23 +0100, Andy Shevchenko wrote:
> Refactor regcache flow that populates cache on initialisation phase
> based on the values in HW. This makes code robust against any possible
> accesses to not-fully initialised caches.
> 
> Changelog v5:
> - added a precursor patch to make things clearer
> - also put the freeing resources into an order (Mark)
> - dropped applied patches
> 
> [...]

Applied to

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

Thanks!

[1/2] regcache: Factor out regcache_hw_exit() helper
      commit: 9891b52ba12e9d5fed5901b6b5f6e0cdcd424390
[2/2] regcache: Move HW readback after cache initialisation
      (no commit info)

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