ARM: avoid unwanted GCC memset()/memcpy() optimisations for IO variants
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 3 Jul 2015 14:22:54 +0000 (15:22 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 3 Jul 2015 19:46:15 +0000 (20:46 +0100)
commit1bd46782d08b01b73df0085b51ea1021b19b44fd
tree12f984aae768b67a6406e5e076f0ba17badc11d7
parent9ab79bb22cc77adcca5ebbadea6caec6a478f283
ARM: avoid unwanted GCC memset()/memcpy() optimisations for IO variants

We don't want GCC optimising our memset_io(), memcpy_fromio() or
memcpy_toio() variants, so we must not call one of the standard
functions.  Provide a separate name for our assembly memcpy() and
memset() functions, and use that instead, thereby bypassing GCC's
ability to optimise these operations.

GCCs optimisation may introduce unaligned accesses which are invalid
for device mappings.

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