From 376027f2a3888ef3dec73ee41f85d90e51162d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Tue, 8 Sep 2015 11:24:16 -0300 Subject: Add TuxOnIce support --- kernel/power/power.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'kernel/power/power.h') diff --git a/kernel/power/power.h b/kernel/power/power.h index caadb566e..b5c9efb36 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -36,8 +36,12 @@ static inline char *check_image_kernel(struct swsusp_info *info) return arch_hibernation_header_restore(info) ? "architecture specific data" : NULL; } +#else +extern char *check_image_kernel(struct swsusp_info *info); #endif /* CONFIG_ARCH_HIBERNATION_HEADER */ +extern int init_header(struct swsusp_info *info); +extern char resume_file[256]; /* * Keep some memory free so that I/O operations can succeed without paging * [Might this be more than 4 MB?] @@ -77,6 +81,8 @@ static struct kobj_attribute _name##_attr = { \ .store = _name##_store, \ } +extern struct pbe *restore_pblist; + /* Preferred image size in bytes (default 500 MB) */ extern unsigned long image_size; /* Size of memory reserved for drivers (default SPARE_PAGES x PAGE_SIZE) */ @@ -260,6 +266,31 @@ static inline void suspend_thaw_processes(void) } #endif +extern struct page *saveable_page(struct zone *z, unsigned long p); +#ifdef CONFIG_HIGHMEM +struct page *saveable_highmem_page(struct zone *z, unsigned long p); +#else +static +inline void *saveable_highmem_page(struct zone *z, unsigned long p) +{ + return NULL; +} +#endif + +#define PBES_PER_PAGE (PAGE_SIZE / sizeof(struct pbe)) +extern struct list_head nosave_regions; + +/** + * This structure represents a range of page frames the contents of which + * should not be saved during the suspend. + */ + +struct nosave_region { + struct list_head list; + unsigned long start_pfn; + unsigned long end_pfn; +}; + #ifdef CONFIG_PM_AUTOSLEEP /* kernel/power/autosleep.c */ @@ -286,3 +317,10 @@ extern int pm_wake_lock(const char *buf); extern int pm_wake_unlock(const char *buf); #endif /* !CONFIG_PM_WAKELOCKS */ + +#ifdef CONFIG_TOI +unsigned long toi_get_nonconflicting_page(void); +#define BM_END_OF_MAP (~0UL) +#else +#define toi_get_nonconflicting_page() (0) +#endif -- cgit v1.2.3