ARM: pm: convert some assembly to C
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 1 Sep 2011 10:52:33 +0000 (11:52 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 20 Sep 2011 22:33:44 +0000 (23:33 +0100)
commitabda1bd5f4e04054ce083c298fcd68a743e9df03
treebdbc41f348d17a6cdb7259a0604d3f501801f3b6
parent62b2d07c0ea9db40a1787d2d0ab49f03c3e0613c
ARM: pm: convert some assembly to C

Convert some of the sleep.S guts to C code, which makes it easier to
use our macros and to add L2 cache handling.  We provide a helper
function, __cpu_suspend_save(), which deals with saving the common
state, setting up for resume, and flushing caches.

The remainder left as assembly code is the saving of the CPU general
purpose registers, and allocating space on the stack to save the CPU
specific registers and resume state.

Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/proc-fns.h
arch/arm/kernel/sleep.S
arch/arm/kernel/suspend.c