aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-05-08 05:23:49 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-09 02:34:56 -0400
commit940d67f6b95166475ff6e600ef7658e1cd441278 (patch)
tree390f7e30228ae2f22d0009831f80fb909df1e177 /include/linux/suspend.h
parentde372ecd80a42c4fb485c7232475301a18d05184 (diff)
[POWERPC] swsusp: Introduce register_nosave_region_late
This patch introduces a new register_nosave_region_late function that can be called from initcalls when register_nosave_region can no longer be used because it uses bootmem. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 9d2aa1a12aa0..1f2f7ba9e709 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -34,13 +34,22 @@ static inline void pm_restore_console(void) {}
34 34
35#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) 35#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND)
36/* kernel/power/snapshot.c */ 36/* kernel/power/snapshot.c */
37extern void __init register_nosave_region(unsigned long, unsigned long); 37extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
38static inline void register_nosave_region(unsigned long b, unsigned long e)
39{
40 __register_nosave_region(b, e, 0);
41}
42static inline void register_nosave_region_late(unsigned long b, unsigned long e)
43{
44 __register_nosave_region(b, e, 1);
45}
38extern int swsusp_page_is_forbidden(struct page *); 46extern int swsusp_page_is_forbidden(struct page *);
39extern void swsusp_set_page_free(struct page *); 47extern void swsusp_set_page_free(struct page *);
40extern void swsusp_unset_page_free(struct page *); 48extern void swsusp_unset_page_free(struct page *);
41extern unsigned long get_safe_page(gfp_t gfp_mask); 49extern unsigned long get_safe_page(gfp_t gfp_mask);
42#else 50#else
43static inline void register_nosave_region(unsigned long b, unsigned long e) {} 51static inline void register_nosave_region(unsigned long b, unsigned long e) {}
52static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
44static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } 53static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
45static inline void swsusp_set_page_free(struct page *p) {} 54static inline void swsusp_set_page_free(struct page *p) {}
46static inline void swsusp_unset_page_free(struct page *p) {} 55static inline void swsusp_unset_page_free(struct page *p) {}