ARM: avoid alignment related control reg writeouts
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 3 Nov 2013 21:19:41 +0000 (23:19 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 3 Nov 2013 21:19:41 +0000 (23:19 +0200)
Always writing out the same value on ARMv7, no need to..

arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-header.S

index b2a27b6..1df0380 100644 (file)
@@ -405,7 +405,7 @@ ENTRY(vector_swi)
 
 #endif
 
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 7
        ldr     ip, __cr_alignment
        ldr     ip, [ip]
        mcr     p15, 0, ip, c1, c0              @ update control register
@@ -485,7 +485,7 @@ __sys_trace_return:
        b       ret_slow_syscall
 
        .align  5
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 7
        .type   __cr_alignment, #object
 __cr_alignment:
        .word   cr_alignment
index 9a8531e..5413334 100644 (file)
@@ -37,7 +37,7 @@
        .endm
 
        .macro  alignment_trap, rtemp
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 7
        ldr     \rtemp, .LCcralign
        ldr     \rtemp, [\rtemp]
        mcr     p15, 0, \rtemp, c1, c0