regmap: kunit: Add test for cache sync interaction with ranges
authorMark Brown <broonie@kernel.org>
Mon, 23 Oct 2023 17:19:12 +0000 (18:19 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 26 Oct 2023 13:00:42 +0000 (14:00 +0100)
commit6a2e332c2cbddd17d7dcb8f334953593f1324c8e
tree4c6a64e0ca03caafe774a36a41888825281671c2
parentfabe32cc1eca7857837abcb56b242bc4845b7067
regmap: kunit: Add test for cache sync interaction with ranges

Hector Martin reports that since when doing a cache sync we enable cache
bypass if the selector register for a range is cached then we might leave
the physical selector register pointing to a different value to that which
we have in the cache. If we then try to write to the page that our cache
tells us is selected we will not update the selector register and write to
the wrong page. Add a test case covering this.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231023-regmap-test-window-cache-v1-2-d8a71f441968@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-kunit.c