Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
[sfrench/cifs-2.6.git] / arch / arm / mm / proc-v7m.S
index 8dea61640cc1a5e09332ad7ebf777773c9b38cc9..47a5acc644333f7f995293ef6b3dc6fb3527270a 100644 (file)
@@ -135,9 +135,11 @@ __v7m_setup_cont:
        dsb
        mov     r6, lr                  @ save LR
        ldr     sp, =init_thread_union + THREAD_START_SP
+       stmia   sp, {r0-r3, r12}
        cpsie   i
        svc     #0
 1:     cpsid   i
+       ldmia   sp, {r0-r3, r12}
        str     r5, [r12, #11 * 4]      @ restore the original SVC vector entry
        mov     lr, r6                  @ restore LR
 
@@ -147,10 +149,10 @@ __v7m_setup_cont:
 
        @ Configure caches (if implemented)
        teq     r8, #0
-       stmneia r12, {r0-r6, lr}        @ v7m_invalidate_l1 touches r0-r6
+       stmneia sp, {r0-r6, lr}         @ v7m_invalidate_l1 touches r0-r6
        blne    v7m_invalidate_l1
        teq     r8, #0                  @ re-evalutae condition
-       ldmneia r12, {r0-r6, lr}
+       ldmneia sp, {r0-r6, lr}
 
        @ Configure the System Control Register to ensure 8-byte stack alignment
        @ Note the STKALIGN bit is either RW or RAO.