lemote: Hibernation Support in mips system
Subsystems (3)
PATCH 11/14 lemote: Hibernation Support in mips system
---arch/mips/Kconfig | 3 +arch/mips/Makefile | 3 +arch/mips/include/asm/suspend.h | 2 + arch/mips/kernel/asm-offsets.c | 13 ++++++ arch/mips/power/Makefile | 1 +arch/mips/power/cpu.c | 48 ++++++++++++++++++++++++ arch/mips/power/hibernate.S | 78 +++++++++++++++++++++++++++++++++++++++ include/linux/suspend.h | 2 +-
8 files changed, 149 insertions(+), 1 deletions(-)
create mode 100644 arch/mips/power/Makefile
create mode 100644 arch/mips/power/cpu.c
create mode 100644 arch/mips/power/hibernate.S
arch/mips/Kconfig +0 -0
@@ -2133,6 +2133,9 @@ endmenu
menu "Power management options"
+config ARCH_HIBERNATION_POSSIBLE
+ def_bool y
+
config ARCH_SUSPEND_POSSIBLEdef_bool y
depends on !SMP
arch/mips/Makefile +0 -0
@@ -693,6 +693,9 @@ core-y += arch/mips/kernel/ arch/mips/mm/
arch/mips/math-emu/
drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
+# suspend and hibernation support
+drivers-$(CONFIG_PM) += arch/mips/power/
+
ifdef CONFIG_LASAT
rom.bin rom.sw: vmlinux
$(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
(quoted diff) +0 -0
b/arch/mips/include/asm/suspend.h
index 2562f8f..1d44287 100644
arch/mips/include/asm/suspend.h +0 -0
@@ -3,4 +3,6 @@
/* Somewhen... Maybe :-) */
+static inline int arch_prepare_suspend(void) { return 0; } +
#endif /* __ASM_SUSPEND_H */
arch/mips/kernel/asm-offsets.c +0 -0
@@ -14,6 +14,7 @@
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/kbuild.h>
+#include <linux/suspend.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
@@ -326,3 +327,15 @@ void output_octeon_cop2_state_defines(void) BLANK();
}
#endif
+
+#ifdef CONFIG_HIBERNATION
+void output_pbe_defines(void)
+{
+ COMMENT(" Linux struct pbe offsets. ");
+ OFFSET(PBE_ADDRESS , pbe, address);
+ OFFSET(PBE_ORIG_ADDRESS , pbe, orig_address);
+ OFFSET(PBE_NEXT , pbe, next);
+ DEFINE(PBE_SIZE , sizeof(struct pbe));
+ BLANK();
+}
+#endif
arch/mips/power/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_HIBERNATION) += cpu.o hibernate.o
arch/mips/power/cpu.c new file +46 -0
46 lines not on this page · raw message
PAGE_SHIFT;
+ return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); +}
arch/mips/power/hibernate.S new file +78 -0
78 lines not on this page · raw message
include/linux/suspend.h +0 -0
@@ -1,7 +1,7 @@
#ifndef _LINUX_SUSPEND_H
#define _LINUX_SUSPEND_H
-#if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32)
|| defined(CONFIG_PPC64) +#if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32) || defined(CONFIG_PPC64) || defined(CONFIG_MIPS)
#include <asm/suspend.h>
#endif
#include <linux/swap.h>
Signature · 1 line
1.5.6.5