]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regmap: kunit: Run sparse cache tests at non-zero register addresses
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 8 Apr 2024 14:45:53 +0000 (15:45 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2024 15:38:08 +0000 (16:38 +0100)
commit710915743d53d19a1baf0326302aa1f743ab018e
treea538fa2a3c30f3cd904168b8297162f94cb75d47
parent48bccea96fead1b212e19e38e50bf8e69287c45d
regmap: kunit: Run sparse cache tests at non-zero register addresses

Run the cache_drop() and cache_present() tests at blocks of addresses
that don't start at zero.

This adds a from_reg parameter to struct regmap_test_param. This is
used to set the base address of the register defaults created by
gen_regmap().

Extra entries are added to sparse_cache_types_list[] to test at non-zero
from_reg values. The cache_drop() and cache_present() tests are updated
to test at the given offset.

The aim here is to add test cases to cache_drop() for the bug fixed by
commit 00bb549d7d63 ("regmap: maple: Fix cache corruption in
regcache_maple_drop()")

But the same parameter table is used by the cache_present() test so
let's also update that to use from_reg.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240408144600.230848-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-kunit.c