ARM: pm: make MULTI_CPU and !MULTI_CPU resume paths the same

Eliminate the differences between MULTI_CPU and non-MULTI_CPU resume
paths, making the saved structure identical irrespective of the way
the kernel was configured.

Acked-by: Frank Hofmann <frank.hofmann@tomtom.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Russell King 2011-06-13 13:39:44 +01:00
parent 3125af241c
commit 6b5f6ab0e1
1 changed files with 3 additions and 9 deletions

View File

@ -40,9 +40,11 @@ ENTRY(cpu_suspend)
#else #else
mov r2, sp @ current virtual SP mov r2, sp @ current virtual SP
ldr r0, =cpu_suspend_size ldr r0, =cpu_suspend_size
ldr ip, =cpu_do_resume
sub sp, sp, r0 @ allocate CPU state on stack sub sp, sp, r0 @ allocate CPU state on stack
mov r0, sp @ save pointer mov r0, sp @ save pointer
stmfd sp!, {r1, r2, r3} @ save v:p, virt SP, return fn add ip, ip, r1 @ convert resume fn to phys
stmfd sp!, {r1, r2, r3, ip} @ save v:p, virt SP, retfn, phys resume fn
ldr r3, =sleep_save_sp ldr r3, =sleep_save_sp
add r2, sp, r1 @ convert SP to phys add r2, sp, r1 @ convert SP to phys
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
@ -120,20 +122,12 @@ ENTRY(cpu_resume)
ldr r0, sleep_save_sp @ stack phys addr ldr r0, sleep_save_sp @ stack phys addr
#endif #endif
setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off
#ifdef MULTI_CPU
@ load v:p, stack, return fn, resume fn @ load v:p, stack, return fn, resume fn
ARM( ldmia r0!, {r1, sp, lr, pc} ) ARM( ldmia r0!, {r1, sp, lr, pc} )
THUMB( ldmia r0!, {r1, r2, r3, r4} ) THUMB( ldmia r0!, {r1, r2, r3, r4} )
THUMB( mov sp, r2 ) THUMB( mov sp, r2 )
THUMB( mov lr, r3 ) THUMB( mov lr, r3 )
THUMB( bx r4 ) THUMB( bx r4 )
#else
@ load v:p, stack, return fn
ARM( ldmia r0!, {r1, sp, lr} )
THUMB( ldmia r0!, {r1, r2, lr} )
THUMB( mov sp, r2 )
b cpu_do_resume
#endif
ENDPROC(cpu_resume) ENDPROC(cpu_resume)
sleep_save_sp: sleep_save_sp: