Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 363c55ca authored by Wu Zhangjin's avatar Wu Zhangjin Committed by Ralf Baechle
Browse files

MIPS: Add hibernation support



[Ralf: SMP support requires CPU hotplugging which MIPS currently doesn't
support.  As implemented in this patch cache and tlb flushing will also be
invoked with interrupts disabled so smp_call_function() will blow up in
charming ways.  So limit to !SMP.]

Reviewed-by: default avatarPavel Machek <pavel@ucw.cz>
Reviewed-by: default avatarYan Hua <yanh@lemote.com>
Reviewed-by: default avatarArnaud Patard <apatard@mandriva.com>
Reviewed-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarWu Zhangjin <wuzj@lemote.com>
Signed-off-by: default avatarHu Hongbing <huhb@lemote.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 4bb1a108
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2134,6 +2134,10 @@ endmenu

menu "Power management options"

config ARCH_HIBERNATION_POSSIBLE
	def_bool y
	depends on !SMP

config ARCH_SUSPEND_POSSIBLE
	def_bool y
	depends on !SMP
+3 −0
Original line number Diff line number Diff line
@@ -677,6 +677,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 $@
+9 −0
Original line number Diff line number Diff line
#ifndef __ASM_SUSPEND_H
#define __ASM_SUSPEND_H

static inline int arch_prepare_suspend(void) { return 0; }

/* References to section boundaries */
extern const void __nosave_begin, __nosave_end;

#endif /* __ASM_SUSPEND_H */
+13 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_HIBERNATION) += cpu.o hibernate.o
Loading