From: Anson Huang Date: Tue, 9 Oct 2012 15:04:42 +0000 (-0400) Subject: ENGR00227425 mx6sl: Need to save all registers before calling C function X-Git-Tag: v3.0.35-fsl~392 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f7a4c1e684051939fe9b6e54495f45975fac6b12;p=karo-tx-linux.git ENGR00227425 mx6sl: Need to save all registers before calling C function 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 --- diff --git a/arch/arm/mach-mx6/mx6_suspend.S b/arch/arm/mach-mx6/mx6_suspend.S index a5815ef9bd6f..683ba38b0519 100644 --- a/arch/arm/mach-mx6/mx6_suspend.S +++ b/arch/arm/mach-mx6/mx6_suspend.S @@ -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