diff options
author | Scott Williams <scwilliams@nvidia.com> | 2011-07-27 21:30:14 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:59 -0800 |
commit | 3a83ad92158b2daa2e03b7e9f62ba0a55c444205 (patch) | |
tree | 4d614f7d08d71df696880e7d826fa97d9513d90e /arch/arm/mach-tegra/sleep.S | |
parent | 111021ac897ab0f8256201de00b1e6ad6b8f0dd1 (diff) |
ARM: tegra: power: Clean up stack pointer handling
Clean up some rather fragile manipulation of the stack pointer in
the CPU suspend code. It's all unnecssary except in one case where
Tegra2 can abort a suspend because of activity on the other CPU.
Change-Id: Ic872364c5abd58f704b2afeeae4d8722f127d3bb
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Rebase-Id: R5873dd120df2e98cc5bfcc74f86ebea6cc10f9b2
Diffstat (limited to 'arch/arm/mach-tegra/sleep.S')
-rw-r--r-- | arch/arm/mach-tegra/sleep.S | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S index 77ea6b3ba363..36dff782f3fa 100644 --- a/arch/arm/mach-tegra/sleep.S +++ b/arch/arm/mach-tegra/sleep.S @@ -155,17 +155,23 @@ ENDPROC(tegra_cpu_exit_coherency) /* * tegra_cpu_save * - * r0 = v2p - * r3 = resume address - * saves r4-r11 on the stack - * modifies sp, returns the sp after saving registers but before cpu_suspend, - * appropriate for restoring an aborted suspend that does not call cpu_resume - * corrupts r1, r3-r6, r9, r10 + * Input: + * r0 = v:p offset + * r3 = resume address + * Output: + * r0 = v:p offset + * r7 = SP after saving the registers but before cpu_suspend, suitable + * for restoring an aborted suspend that does not call cpu_resume + * sp = SP after cpu_suspend (the 'real' SP) + * Saves r4-r11 on the stack + * Corrupts r1, r3-r10 */ ENTRY(tegra_cpu_save) stmfd sp!, {r4 - r11} stmfd sp!, {r3} + /* FIXME: The next two instructions should be removed if our change to + save the diagnostic regsiter in the CPU context is accepted. */ mrc p15, 0, r4, c15, c0, 1 @ read diagnostic register stmfd sp!, {r4} @@ -180,7 +186,6 @@ ENTRY(tegra_cpu_save) mov lr, r4 mov r0, r5 mov r2, r6 - mov sp, r7 mov pc, lr ENDPROC(tegra_cpu_save) @@ -221,6 +226,8 @@ tegra_cpu_resume: bl cpu_init + /* FIXME: The next two instructions should be removed if our change to + save the diagnostic regsiter in the CPU context is accepted. */ ldmfd sp!, {r4} mcr p15, 0, r4, c15, c0, 1 @ write diagnostic register ldmfd sp!, {lr} |