diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-03-06 04:47:02 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-03-09 23:55:40 -0400 |
commit | 2ef7f0dab6b3d171b6aff00a47077385ae3155b5 (patch) | |
tree | 6066996e7dfc65b02470ae4c1c96c6c7c70965a6 /arch/sh/kernel/asm-offsets.c | |
parent | edab56f4c90f45ba4e61d06d3fc9658da4e94bde (diff) |
sh: hibernation support
Add Suspend-to-disk / swsusp / CONFIG_HIBERNATION support
to the SuperH architecture.
To suspend, use "swapon /dev/sda2; echo disk > /sys/power/state"
To resume, pass "resume=/dev/sda2" on the kernel command line.
The patch "pm: rework includes, remove arch ifdefs V2" is
needed to allow the generic swsusp code to build properly.
Hibernation is not enabled with this patch though, a patch
setting ARCH_HIBERNATION_POSSIBLE will be submitted later.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/asm-offsets.c')
-rw-r--r-- | arch/sh/kernel/asm-offsets.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/kernel/asm-offsets.c b/arch/sh/kernel/asm-offsets.c index 57cf0e0680f3..99aceb28ee24 100644 --- a/arch/sh/kernel/asm-offsets.c +++ b/arch/sh/kernel/asm-offsets.c | |||
@@ -12,8 +12,10 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/kbuild.h> | 14 | #include <linux/kbuild.h> |
15 | #include <linux/suspend.h> | ||
15 | 16 | ||
16 | #include <asm/thread_info.h> | 17 | #include <asm/thread_info.h> |
18 | #include <asm/suspend.h> | ||
17 | 19 | ||
18 | int main(void) | 20 | int main(void) |
19 | { | 21 | { |
@@ -25,5 +27,11 @@ int main(void) | |||
25 | DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); | 27 | DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); |
26 | DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block)); | 28 | DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block)); |
27 | 29 | ||
30 | #ifdef CONFIG_HIBERNATION | ||
31 | DEFINE(PBE_ADDRESS, offsetof(struct pbe, address)); | ||
32 | DEFINE(PBE_ORIG_ADDRESS, offsetof(struct pbe, orig_address)); | ||
33 | DEFINE(PBE_NEXT, offsetof(struct pbe, next)); | ||
34 | DEFINE(SWSUSP_ARCH_REGS_SIZE, sizeof(struct swsusp_arch_regs)); | ||
35 | #endif | ||
28 | return 0; | 36 | return 0; |
29 | } | 37 | } |