aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-03-04 05:25:45 -0500
committerPaul Burton <paul.burton@imgtec.com>2014-05-02 11:39:10 -0400
commit74e91335190c628b870c69cff8360d23707b1f53 (patch)
tree255cb7709b6123938c057f206522f00e2b450d9f /arch/mips/kernel/asm-offsets.c
parenteaa38d6343adbb5070c27af29aeeb3df126f47f2 (diff)
MIPS: PM: Implement PM helper macros
Implement assembler helper macros in asm/pm.h for platform code to use for saving context across low power states - for example suspend to RAM or powered down cpuidle states. Macros are provided for saving and restoring the main CPU context used by C code and doing important configuration which must be done very early during resume. Notably EVA needs segmentation control registers to be restored before the stack or dynamically allocated memory is accessed, so that state is saved in global data. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips/kernel/asm-offsets.c')
-rw-r--r--arch/mips/kernel/asm-offsets.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 0ea75c244b48..e085cde13dba 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -14,6 +14,7 @@
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/kbuild.h> 15#include <linux/kbuild.h>
16#include <linux/suspend.h> 16#include <linux/suspend.h>
17#include <asm/pm.h>
17#include <asm/ptrace.h> 18#include <asm/ptrace.h>
18#include <asm/processor.h> 19#include <asm/processor.h>
19#include <asm/smp-cps.h> 20#include <asm/smp-cps.h>
@@ -404,6 +405,20 @@ void output_pbe_defines(void)
404} 405}
405#endif 406#endif
406 407
408#ifdef CONFIG_CPU_PM
409void output_pm_defines(void)
410{
411 COMMENT(" PM offsets. ");
412#ifdef CONFIG_EVA
413 OFFSET(SSS_SEGCTL0, mips_static_suspend_state, segctl[0]);
414 OFFSET(SSS_SEGCTL1, mips_static_suspend_state, segctl[1]);
415 OFFSET(SSS_SEGCTL2, mips_static_suspend_state, segctl[2]);
416#endif
417 OFFSET(SSS_SP, mips_static_suspend_state, sp);
418 BLANK();
419}
420#endif
421
407void output_kvm_defines(void) 422void output_kvm_defines(void)
408{ 423{
409 COMMENT(" KVM/MIPS Specfic offsets. "); 424 COMMENT(" KVM/MIPS Specfic offsets. ");