mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
regmap: Load register defaults in blocks rather than register by register
[ Upstream commit3a48d2127f] Currently we use the normal single register write function to load the default values into the cache, resulting in a large number of reallocations when there are blocks of registers as we extend the memory region we are using to store the values. Instead scan through the list of defaults for blocks of adjacent registers and do a single allocation and insert for each such block. No functional change. We do not take advantage of the maple tree preallocation, this is purely at the regcache level. It is not clear to me yet if the maple tree level would help much here or if we'd have more overhead from overallocating and then freeing maple tree data. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230523-regcache-maple-load-defaults-v1-1-0c04336f005d@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of:b0393e1fe4("regmap: maple: Use alloc_flags for memory allocations") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
88e9c27e12
commit
b60dbf791b
1 changed files with 52 additions and 6 deletions
Loading…
Add table
Add a link
Reference in a new issue