aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-09-01 06:52:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-09-20 18:33:44 -0400
commitabda1bd5f4e04054ce083c298fcd68a743e9df03 (patch)
treebdbc41f348d17a6cdb7259a0604d3f501801f3b6 /arch/arm/include/asm
parent62b2d07c0ea9db40a1787d2d0ab49f03c3e0613c (diff)
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>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/proc-fns.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h
index 633d1cb84d87..9e92cb205e65 100644
--- a/arch/arm/include/asm/proc-fns.h
+++ b/arch/arm/include/asm/proc-fns.h
@@ -81,6 +81,10 @@ extern void cpu_dcache_clean_area(void *, int);
81extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 81extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
82extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext); 82extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext);
83extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); 83extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
84
85/* These three are private to arch/arm/kernel/suspend.c */
86extern void cpu_do_suspend(void *);
87extern void cpu_do_resume(void *);
84#else 88#else
85#define cpu_proc_init processor._proc_init 89#define cpu_proc_init processor._proc_init
86#define cpu_proc_fin processor._proc_fin 90#define cpu_proc_fin processor._proc_fin
@@ -89,6 +93,10 @@ extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
89#define cpu_dcache_clean_area processor.dcache_clean_area 93#define cpu_dcache_clean_area processor.dcache_clean_area
90#define cpu_set_pte_ext processor.set_pte_ext 94#define cpu_set_pte_ext processor.set_pte_ext
91#define cpu_do_switch_mm processor.switch_mm 95#define cpu_do_switch_mm processor.switch_mm
96
97/* These three are private to arch/arm/kernel/suspend.c */
98#define cpu_do_suspend processor.do_suspend
99#define cpu_do_resume processor.do_resume
92#endif 100#endif
93 101
94extern void cpu_resume(void); 102extern void cpu_resume(void);