]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00227425 mx6sl: Need to save all registers before calling C function
authorAnson Huang <b20788@freescale.com>
Tue, 9 Oct 2012 15:04:42 +0000 (11:04 -0400)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:13:09 +0000 (14:13 +0200)
Different linker may use r12, we should save/restore all
registers(r0-r12) before calling C function to prevent
these registers from corruption in C code.

Signed-off-by: Anson Huang <b20788@freescale.com>
arch/arm/mach-mx6/mx6_suspend.S

index a5815ef9bd6ffd23db1efeecd1b775534e9e6928..683ba38b05198fc8add9bc4e983f038bb670d05e 100644 (file)
@@ -1519,11 +1519,11 @@ restore control register to enable cache
 #endif
 
        mov     r8, lr
-       push    {r0}
+       push    {r0-r12}
 
        /* Set up the per-CPU stacks */
        bl      cpu_init
-       pop     {r0}
+       pop     {r0-r12}
 
        /*
         * Restore the MMU table entry that was modified for