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)
committerSimone Willett <swillett@nvidia.com>
Fri, 6 Apr 2012 00:52:31 +0000 (17:52 -0700)
commit11a2e1bb69affe9e8273bc6d1452cd9282ddd27a
treee315efb599c06d408a2fdc732708957ce65ba6b9
parent16e0bb8c46656b1d902d422e0065c746af161a1c
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.

Change-Id: I0e8bc196fa7302cfe52c17d39675dadf25ea1004
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>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/85728
Reviewed-by: Automatic_Commit_Validation_User
arch/arm/include/asm/proc-fns.h
arch/arm/kernel/sleep.S
arch/arm/kernel/suspend.c