regmap: maple: Implement block sync for the maple tree cache
Subsystems (2)
Mark Brown
maintainerPATCH 1/1 regmap: maple: Implement block sync for the maple tree cache
For register maps where we can write multiple values in a single bus operation it is generally much faster to do so. Improve the performance of maple tree cache syncs on such devices by identifying blocks of adjacent registers that need to be written out and combining them into a single operation.
Combining writes does mean that we need to allocate a scratch buffer and format the data into it but it is expected that for most cases where caches are in use the cost of I/O will be much greater than the cost of doing the allocation and format.
--- drivers/base/regmap/internal.h | 2 + drivers/base/regmap/regcache-maple.c | 82 +++++++++++++++++++++++++++++++++--- drivers/base/regmap/regcache.c | 4 +- 3 files changed, 80 insertions(+), 8 deletions(-)
drivers/base/regmap/internal.h +2 -0
@@ -257,6 +257,8 @@ int regcache_sync_block(struct regmap *map, void *block,unsigned long *cache_present, unsigned int block_base, unsigned int start, unsigned int end); +bool regcache_reg_needs_sync (struct regmap *map,unsigned int reg, +unsigned int val); static inline const void *regcache_get_val_addr(struct regmap *map, const void *base,
drivers/base/regmap/regcache-maple.c +76 -6
108 lines not on this page · raw message
drivers/base/regmap/regcache.c +2 -2
@@ -279,8 +279,8 @@ int regcache_write(struct regmap *map,return 0 ; } -static bool regcache_reg_needs_sync (struct regmap *map,unsigned int reg, -unsigned int val) +bool regcache_reg_needs_sync (struct regmap *map,unsigned int reg, +unsigned int val) {int ret;
---
base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
change-id: 20230609-regcache-maple-sync-raw-c58188904739
Best regards,
Signature · 1 line
Mark Brown <[email protected]>
Mark Brown
maintainerQuoted 6 lines · Mark Brown
For register maps where we can write multiple values in a single bus operation it is generally much faster to do so. Improve the performance of maple tree cache syncs on such devices by identifying blocks of adjacent registers that need to be written out and combining them into a single operation.
Quoted 6 lines
Combining writes does mean that we need to allocate a scratch buffer and format the data into it but it is expected that for most cases where caches are in use the cost of I/O will be much greater than the cost of doing the allocation and format.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next
Thanks!
[1/1] regmap: maple: Implement block sync for the maple tree cache
commit: bfa0b38c148379c8a8c52e23bbdcb086414fb354
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