Permalink
Browse files

ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors

Recent gcc versions generate unaligned accesses by default on ARMv6 and
later processors. This patch ensures that the SCTLR.A bit is always
cleared on such processors to avoid kernel traping before
alignment_init() is called.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: John Linn <John.Linn@xilinx.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information...
ctmarinas authored and GNUtoo committed Nov 7, 2011
1 parent f885b2b commit 6922ae2e266bf3309889781e9eafae1a1573a0ec
Showing with 1 addition and 1 deletion.
  1. +1 −1 arch/arm/kernel/head.S
View
@@ -158,7 +158,7 @@ __secondary_data:
* registers.
*/
__enable_mmu:
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6
orr r0, r0, #CR_A
#else
bic r0, r0, #CR_A

0 comments on commit 6922ae2

Please sign in to comment.