From: Linus Torvalds Date: Wed, 9 May 2007 19:56:01 +0000 (-0700) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc X-Git-Tag: v2.6.22-rc1~146 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aabded9c3aab5160ae2ca3dd1fa0fa37f3d510e4;p=linux-2.6 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Further fixes for the removal of 4level-fixup hack from ppc32 [POWERPC] EEH: log all PCI-X and PCI-E AER registers [POWERPC] EEH: capture and log pci state on error [POWERPC] EEH: Split up long error msg [POWERPC] EEH: log error only after driver notification. [POWERPC] fsl_soc: Make mac_addr const in fs_enet_of_init(). [POWERPC] Don't use SLAB/SLUB for PTE pages [POWERPC] Spufs support for 64K LS mappings on 4K kernels [POWERPC] Add ability to 4K kernel to hash in 64K pages [POWERPC] Introduce address space "slices" [POWERPC] Small fixes & cleanups in segment page size demotion [POWERPC] iSeries: Make HVC_ISERIES the default [POWERPC] iSeries: suppress build warning in lparmap.c [POWERPC] Mark pages that don't exist as nosave [POWERPC] swsusp: Introduce register_nosave_region_late --- aabded9c3aab5160ae2ca3dd1fa0fa37f3d510e4 diff --cc include/linux/suspend.h index d74da9122b,1f2f7ba9e7..9c7cb64306 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@@ -32,36 -32,24 +32,45 @@@ static inline int pm_prepare_console(vo static inline void pm_restore_console(void) {} #endif +/** + * struct hibernation_ops - hibernation platform support + * + * The methods in this structure allow a platform to override the default + * mechanism of shutting down the machine during a hibernation transition. + * + * All three methods must be assigned. + * + * @prepare: prepare system for hibernation + * @enter: shut down system after state has been saved to disk + * @finish: finish/clean up after state has been reloaded + */ +struct hibernation_ops { + int (*prepare)(void); + int (*enter)(void); + void (*finish)(void); +}; + #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) /* kernel/power/snapshot.c */ - extern void __init register_nosave_region(unsigned long, unsigned long); + extern void __register_nosave_region(unsigned long b, unsigned long e, int km); + static inline void register_nosave_region(unsigned long b, unsigned long e) + { + __register_nosave_region(b, e, 0); + } + static inline void register_nosave_region_late(unsigned long b, unsigned long e) + { + __register_nosave_region(b, e, 1); + } extern int swsusp_page_is_forbidden(struct page *); extern void swsusp_set_page_free(struct page *); extern void swsusp_unset_page_free(struct page *); extern unsigned long get_safe_page(gfp_t gfp_mask); + +extern void hibernation_set_ops(struct hibernation_ops *ops); +extern int hibernate(void); #else static inline void register_nosave_region(unsigned long b, unsigned long e) {} + static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } static inline void swsusp_set_page_free(struct page *p) {} static inline void swsusp_unset_page_free(struct page *p) {}