[PATCH] ARM: Allow kernel unaligned accesses on ARMv6+ processors
Catalin Marinas
catalin.marinas at arm.com
Sat Nov 5 06:41:27 EDT 2011
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 at arm.com>
Cc: John Linn <John.Linn at xilinx.com>
---
arch/arm/kernel/head.S | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index a400a4d..1768db2 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -394,7 +394,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
More information about the linux-arm-kernel
mailing list