From: Catalin Marinas Date: Mon, 7 Nov 2011 17:05:53 +0000 (+0100) Subject: ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors X-Git-Tag: v3.1.3~46 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92fd7a89888fc223337fe5fd5dc83b79e1174340;p=karo-tx-linux.git ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors commit 8428e84d42179c2a00f5f6450866e70d802d1d05 upstream. 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 Tested-by: John Linn Acked-by: Nicolas Pitre Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 742b6108a001..fed957a6ff3b 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -356,7 +356,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