linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Allow kernel unaligned accesses on ARMv6+ processors
@ 2011-11-05 10:41 Catalin Marinas
  2011-11-05 15:59 ` Nicolas Pitre
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Catalin Marinas @ 2011-11-05 10:41 UTC (permalink / raw)
  To: linux-arm-kernel

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>
Cc: John Linn <John.Linn@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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-07 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-05 10:41 [PATCH] ARM: Allow kernel unaligned accesses on ARMv6+ processors Catalin Marinas
2011-11-05 15:59 ` Nicolas Pitre
2011-11-07  2:11 ` John Linn
     [not found] ` <1d0610da-0dc0-4130-9d14-8524820b9846@WA4EHSMHS001.ehs.local>
2011-11-07 17:07   ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).