linux-kernel-test/drivers/base/regmap
Lars-Peter Clausen 3f4ff561bc regmap: rbtree: Make cache_present bitmap per node
With devices which have a dense and small register map but placed at a large
offset the global cache_present bitmap imposes a huge memory overhead. Making
the cache_present per rbtree node avoids the issue and easily reduces the memory
footprint by a factor of ten. For devices with a more sparse map or without a
large base register offset the memory usage might increase slightly by a few
bytes, but not significantly. E.g. for a device which has ~50 registers at
offset 0x4000 the memory footprint of the register cache goes down form 2496
bytes to 175 bytes.

Moving the bitmap to a per node basis means that the handling of the bitmap is
now cache implementation specific and can no longer be managed by the core. The
regcache_sync_block() function is extended by a additional parameter so that the
cache implementation can tell the core which registers in the block are set and
which are not. The parameter is optional and if NULL the core assumes that all
registers are set. The rbtree cache also needs to implement its own drop
callback instead of relying on the core to handle this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29 13:32:41 +01:00
..
internal.h regmap: rbtree: Make cache_present bitmap per node 2013-08-29 13:32:41 +01:00
Kconfig regmap: select REGMAP if REGMAP_MMIO and REGMAP_IRQ enabled 2012-10-17 22:09:35 +09:00
Makefile regmap: flat: Add flat cache type 2013-01-02 10:58:53 +00:00
regcache-flat.c regmap: flat: Add flat cache type 2013-01-02 10:58:53 +00:00
regcache-lzo.c regmap: cache: Pass the map rather than the word size when updating values 2013-03-04 10:30:27 +08:00
regcache-rbtree.c regmap: rbtree: Make cache_present bitmap per node 2013-08-29 13:32:41 +01:00
regcache.c regmap: rbtree: Make cache_present bitmap per node 2013-08-29 13:32:41 +01:00
regmap-debugfs.c Merge remote-tracking branch 'regmap/topic/debugfs' into regmap-next 2013-06-30 12:40:02 +01:00
regmap-i2c.c i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
regmap-irq.c regmap: irq: Clarify error message when we fail to request primary IRQ 2013-03-19 10:50:56 +00:00
regmap-mmio.c regmap: mmio: add register clock support 2013-02-14 16:40:28 +00:00
regmap-spi.c regmap: spi: Handle allocation failures gracefully 2013-02-05 14:14:32 +00:00
regmap.c regmap: regcache: allow read-only regs to be cached 2013-08-09 12:47:29 +01:00