ARM: Allow kernel unaligned accesses on ARMv6+ processors
PATCH 1/1 ARM: 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.
--- arch/arm/kernel/head.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/kernel/head.S +1 -1
@@ -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
PATCH 1/1 ARM: Allow kernel unaligned accesses on ARMv6+ processors
Quoted 7 lines · Catalin Marinas
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]>Cc John Linn <[email protected]>
Quoted 23 lines
--- arch/arm/kernel/head.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/kernel/head.S +1
-1@@ -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_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: Allow kernel unaligned accesses on ARMv6+ processors
In reply to Catalin MarinasQuoted 10 lines
-----Original Message-----
From: Catalin Marinas [mailto:catalin.marinas at gmail.com] On Behalf Of Catalin Marinas
Sent: Saturday, November 05, 2011 3:41 AM
To: linux-arm-kernel at lists.infradead.org
Cc: John Linn
Subject: [PATCH] ARM: Allow kernel unaligned accesses on ARMv6+ processorsRecent gcc versions generate unaligned accesses by default on ARMv6
and
Quoted 6 lines
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]>Cc John Linn <[email protected]>
It worked great, thanks Catalin. I'd love to see a solution merged in the mainline and this seems reasonable.
I'm being pushed to newer tools which require a solution.
Quoted 9 lines
--- arch/arm/kernel/head.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/kernel/head.S +0
-0
arch/arm/kernel/head.S __secondary_data: · line 400
Quoted 8 lines
arch/arm/kernel/head.S +1
-1@@ -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
**** Please ignore the following footer which I'm still working on getting removed, this IS open source information ***
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 ARM: Allow kernel unaligned accesses on ARMv6+ processors
Quoted 15 lines · John Linn
Quoted 10 lines
-----Original Message-----
From: Catalin Marinas [mailto:catalin.marinas at gmail.com] On Behalf Of Catalin Marinas
Sent: Saturday, November 05, 2011 3:41 AM
To: linux-arm-kernel at lists.infradead.org
Cc: John Linn
Subject: [PATCH] ARM: Allow kernel unaligned accesses on ARMv6+ processorsRecent gcc versions generate unaligned accesses by default on ARMv6
and
Quoted 4 lines
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.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Catalin Marinas <[email protected]>Cc John Linn <[email protected]>It worked great, thanks Catalin. I'd love to see a solution merged in the mainline and this seems reasonable.
I'm being pushed to newer tools which require a solution.Tested-by John Linn <[email protected]>
Thanks. I pushed it to Russell's patch system as:
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7150/1
Signature · 1 line
Catalin