]> 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)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:31 +0000 (08:35 +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