]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: io: fix ioremap_wt() implementation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 1 Jul 2015 09:17:55 +0000 (10:17 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 3 Jul 2015 14:00:23 +0000 (15:00 +0100)
commit7d47efcdcf7ae2d7aae22983410b2d3ca9d27471
tree6603b8b4554880e9f0f210d3ac2c2d3a18d0f84a
parent69d0779a55ef16d7e3a4f863dcd0f1e7db2bbe68
ARM: io: fix ioremap_wt() implementation

ioremap_wt() was added by aliasing it to ioremap_nocache(), which is a
device mapping.  Device mappings do not allow unaligned accesses, but
it appears that GCC is able to inline its own memcpy() implementation
which may use such accesses.  The only user of this is pmem, which
uses memcpy() on the region.

Therefore, this is unsafe.  We must implement ioremap_wt() correctly
for ARM, or not at all.

This patch adds a more correct implementation by re-using ioremap_wc()
to provide a normal-memory non-cacheable mapping.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/io.h