aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <[email protected]>2011-11-07 18:05:53 +0100
committerRussell King <[email protected]>2011-11-08 18:25:04 +0000
commit8428e84d42179c2a00f5f6450866e70d802d1d05 (patch)
treef6d316f13665e51f4cb27ea13c5e4f5dcd259690
parent71e63e748ee6f4bad482b8021386eeb74f6e47f1 (diff)
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 <[email protected]> Tested-by: John Linn <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Cc: [email protected] Signed-off-by: Russell King <[email protected]>
-rw-r--r--arch/arm/kernel/head.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 566c54c2a1fe..08c82fd844a8 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -360,7 +360,7 @@ __secondary_data:
* r13 = *virtual* address to jump to upon completion
*/
__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