summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2012-10-09 11:04:42 -0400
committerRanjani Vaidyanathan <ra5478@freescale.com>2012-10-08 18:45:46 -0500
commitea2d0606fb7e7b3ed162e95736b8f78a986b4235 (patch)
treead14ddcef34b18d48c54cafcae1ab6b14421971b
parentd2018669be5c67a1c5907c2c5cb57b6567b7ecc4 (diff)
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 <b20788@freescale.com>
-rw-r--r--arch/arm/mach-mx6/mx6_suspend.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-mx6/mx6_suspend.S b/arch/arm/mach-mx6/mx6_suspend.S
index a39eb94cfecd..e8fd2b259aae 100644
--- a/arch/arm/mach-mx6/mx6_suspend.S
+++ b/arch/arm/mach-mx6/mx6_suspend.S
@@ -1531,11 +1531,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