ARM: pm: convert cpu_suspend() to a normal function
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 13 Jun 2011 14:58:34 +0000 (15:58 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 24 Jun 2011 07:48:43 +0000 (08:48 +0100)
commite8856a8797e76e6883ae81f8f9ecbb231cc535df
treef256d1100f2458e01ca2680052466b24bbabe664
parentdbc125168fd7dda4ffb24a29548746c7bd3b3d87
ARM: pm: convert cpu_suspend() to a normal function

cpu_suspend() has a weird calling method which makes it only possible to
call from assembly code: it returns with a modified stack pointer to
finish the suspend, but on resume, it 'returns' via a provided pointer.

We can make cpu_suspend() appear to be a normal function merely by
swapping the resume pointer argument and the link register.

Do so, and update all callers to take account of this more traditional
behaviour.

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>
arch/arm/include/asm/system.h
arch/arm/kernel/sleep.S
arch/arm/mach-exynos4/sleep.S
arch/arm/mach-pxa/sleep.S
arch/arm/mach-s3c64xx/sleep.S
arch/arm/mach-s5pv210/sleep.S
arch/arm/mach-sa1100/sleep.S
arch/arm/plat-s3c24xx/sleep.S