summaryrefslogtreecommitdiff
path: root/drivers/mtd/tests
diff options
context:
space:
mode:
authorVincent Whitchurch <vincent.whitchurch@axis.com>2022-05-10 17:18:22 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-05-16 18:37:48 +0200
commit9401911f2d9f89035f7acebab16e72d43d1282fb (patch)
tree41ebceb1d4f6963865fd3f7387b45d3166f5216a /drivers/mtd/tests
parentbcdf0315a61a29eb753a607d3a85a4032de72d94 (diff)
mtd: phram: Allow cached mappings
Currently phram always uses ioremap(), but this is unnecessary when normal memory is used. If the reserved-memory node does not specify the no-map property, indicating it should be mapped as system RAM and ioremap() cannot be used on it, use a cached mapping using memremap(MEMREMAP_WB) instead. On one of my systems this improves read performance by ~70%. (Note that this driver has always used normal memcpy/memset functions on memory obtained from ioremap(), which sparse doesn't like. There is no memremap() variant which maps exactly to ioremap() on all architectures, so that behaviour of the driver is not changed to avoid affecting existing users, but the sparse warnings are suppressed in the moved code with __force.) Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220510151822.1809278-1-vincent.whitchurch@axis.com
Diffstat (limited to 'drivers/mtd/tests')
0 files changed, 0 insertions, 0 deletions