Merge branches 'alignment', 'fixes', 'l2c' (early part) and 'misc' into for-next
[cascardo/linux.git] / arch / arm / kernel / entry-header.S
index 1420725..5d702f8 100644 (file)
@@ -37,9 +37,9 @@
 #endif
        .endm
 
-       .macro  alignment_trap, rtemp
+       .macro  alignment_trap, rtemp, label
 #ifdef CONFIG_ALIGNMENT_TRAP
-       ldr     \rtemp, .LCcralign
+       ldr     \rtemp, \label
        ldr     \rtemp, [\rtemp]
        mcr     p15, 0, \rtemp, c1, c0
 #endif
        orrne   r5, V7M_xPSR_FRAMEPTRALIGN
        biceq   r5, V7M_xPSR_FRAMEPTRALIGN
 
+       @ ensure bit 0 is cleared in the PC, otherwise behaviour is
+       @ unpredictable
+       bic     r4, #1
+
        @ write basic exception frame
        stmdb   r2!, {r1, r3-r5}
        ldmia   sp, {r1, r3-r5}