aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/proc-fns.h
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2013-07-17 10:14:45 +0100
committerAlex Shi <alex.shi@linaro.org>2014-03-10 13:38:36 +0800
commitc7603074f3358f3277812380642c2e6cdfb482ae (patch)
tree8bd54cbdf8035183a733018829d0d8e2bdc39da8 /arch/arm64/include/asm/proc-fns.h
parenta6f41c3a903fc013a4591803d86bebe26a5946e9 (diff)
arm64: kernel: suspend/resume registers save/restore
Power management software requires the kernel to save and restore CPU registers while going through suspend and resume operations triggered by kernel subsystems like CPU idle and suspend to RAM. This patch implements code that provides save and restore mechanism for the arm v8 implementation. Memory for the context is passed as parameter to both cpu_do_suspend and cpu_do_resume functions, and allows the callers to implement context allocation as they deem fit. The registers that are saved and restored correspond to the registers set actually required by the kernel to be up and running which represents a subset of v8 ISA. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/proc-fns.h')
-rw-r--r--arch/arm64/include/asm/proc-fns.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/proc-fns.h b/arch/arm64/include/asm/proc-fns.h
index 7cdf466fd0c5..0c657bb54597 100644
--- a/arch/arm64/include/asm/proc-fns.h
+++ b/arch/arm64/include/asm/proc-fns.h
@@ -26,11 +26,14 @@
#include <asm/page.h>
struct mm_struct;
+struct cpu_suspend_ctx;
extern void cpu_cache_off(void);
extern void cpu_do_idle(void);
extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
+extern void cpu_do_suspend(struct cpu_suspend_ctx *ptr);
+extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr);
#include <asm/memory.h>