Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258235
b: refs/heads/master
c: 3fd431b
h: refs/heads/master
i:
  258233: 63a5f6f
  258231: 6dd3cca
v: v3
  • Loading branch information
Russell King committed Jun 24, 2011
1 parent dabb0d3 commit 07110c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fefbcd58590cf33189c6178098e12b31b994b5f
refs/heads/master: 3fd431bd0cbc75a506b90b42619de3b04fe813a7
24 changes: 6 additions & 18 deletions trunk/arch/arm/kernel/sleep.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,13 @@ ENTRY(cpu_suspend)
mov r9, lr
#ifdef MULTI_CPU
ldr r10, =processor
mov r2, sp @ current virtual SP
ldr r0, [r10, #CPU_SLEEP_SIZE] @ size of CPU sleep state
ldr ip, [r10, #CPU_DO_RESUME] @ virtual resume function
sub sp, sp, r0 @ allocate CPU state on stack
mov r0, sp @ save pointer
add ip, ip, r1 @ convert resume fn to phys
stmfd sp!, {r1, r2, ip} @ save v:p, virt SP, phys resume fn
ldr r3, =sleep_save_sp
add r2, sp, r1 @ convert SP to phys
#ifdef CONFIG_SMP
ALT_SMP(mrc p15, 0, lr, c0, c0, 5)
ALT_UP(mov lr, #0)
and lr, lr, #15
str r2, [r3, lr, lsl #2] @ save phys SP
#else
str r2, [r3] @ save phys SP
#endif
mov lr, pc
ldr pc, [r10, #CPU_DO_SUSPEND] @ save CPU state
#else
mov r2, sp @ current virtual SP
ldr r0, =cpu_suspend_size
ldr ip, =cpu_do_resume
#endif
mov r2, sp @ current virtual SP
sub sp, sp, r0 @ allocate CPU state on stack
mov r0, sp @ save pointer
add ip, ip, r1 @ convert resume fn to phys
Expand All @@ -56,6 +40,10 @@ ENTRY(cpu_suspend)
#else
str r2, [r3] @ save phys SP
#endif
#ifdef MULTI_CPU
mov lr, pc
ldr pc, [r10, #CPU_DO_SUSPEND] @ save CPU state
#else
bl cpu_do_suspend
#endif

Expand Down

0 comments on commit 07110c4

Please sign in to comment.