Pārlūkot izejas kodu

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>
Catalin Marinas 13 gadi atpakaļ
vecāks
revīzija
8428e84d42
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      arch/arm/kernel/head.S

+ 1 - 1
arch/arm/kernel/head.S

@@ -360,7 +360,7 @@ __secondary_data:
  *  r13 = *virtual* address to jump to upon completion
  *  r13 = *virtual* address to jump to upon completion
  */
  */
 __enable_mmu:
 __enable_mmu:
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6
 	orr	r0, r0, #CR_A
 	orr	r0, r0, #CR_A
 #else
 #else
 	bic	r0, r0, #CR_A
 	bic	r0, r0, #CR_A