]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
regmap: warn users about uninitialized flat cache
authorSander Vanheule <sander@svanheule.net>
Wed, 29 Oct 2025 08:12:48 +0000 (09:12 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 29 Oct 2025 12:54:05 +0000 (12:54 +0000)
commite062bdfdd6adbb2dee7751d054c1d8df63ddb8b8
tree72a17c672b75995bbde1b5acb2712c015c1eb497
parent9c7f7262bc1affb9b9acd2ec2fb1f6314d5d474c
regmap: warn users about uninitialized flat cache

The standard flat cache did not contain any validity info, so the cache
was always considered to be entirely valid. Multiple mechanisms exist to
initialize the cache on regmap init (defaults, raw defaults, HW init),
but not all drivers are using one of these. As a result, their
implementation might currently depend on the zero-initialized cache or
contain other workarounds.

When reading an uninitialized value from the flat cache, warn the user,
but maintain the current behavior. This will allow developers to switch
to a sparse (flat) cache independently.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
Link: https://patch.msgid.link/20251029081248.52607-3-sander@svanheule.net
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regcache-flat.c