diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
commit | 02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch) | |
tree | 04ef573cd4de095c500c9fc3477f4278c0b36300 /include/linux/suspend.h | |
parent | 7487a2245b8841c77ba9db406cf99a483b9334e9 (diff) | |
parent | 5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r-- | include/linux/suspend.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index a34835ae0e75..9d2aa1a12aa0 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/notifier.h> | 8 | #include <linux/notifier.h> |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/pm.h> | 10 | #include <linux/pm.h> |
11 | #include <linux/mm.h> | ||
11 | 12 | ||
12 | /* struct pbe is used for creating lists of pages that should be restored | 13 | /* struct pbe is used for creating lists of pages that should be restored |
13 | * atomically during the resume from disk, because the page frames they have | 14 | * atomically during the resume from disk, because the page frames they have |
@@ -23,36 +24,32 @@ struct pbe { | |||
23 | extern void drain_local_pages(void); | 24 | extern void drain_local_pages(void); |
24 | extern void mark_free_pages(struct zone *zone); | 25 | extern void mark_free_pages(struct zone *zone); |
25 | 26 | ||
26 | #ifdef CONFIG_PM | 27 | #if defined(CONFIG_PM) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) |
27 | /* kernel/power/swsusp.c */ | ||
28 | extern int software_suspend(void); | ||
29 | |||
30 | #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) | ||
31 | extern int pm_prepare_console(void); | 28 | extern int pm_prepare_console(void); |
32 | extern void pm_restore_console(void); | 29 | extern void pm_restore_console(void); |
33 | #else | 30 | #else |
34 | static inline int pm_prepare_console(void) { return 0; } | 31 | static inline int pm_prepare_console(void) { return 0; } |
35 | static inline void pm_restore_console(void) {} | 32 | static inline void pm_restore_console(void) {} |
36 | #endif /* defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) */ | 33 | #endif |
34 | |||
35 | #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) | ||
36 | /* kernel/power/snapshot.c */ | ||
37 | extern void __init register_nosave_region(unsigned long, unsigned long); | ||
38 | extern int swsusp_page_is_forbidden(struct page *); | ||
39 | extern void swsusp_set_page_free(struct page *); | ||
40 | extern void swsusp_unset_page_free(struct page *); | ||
41 | extern unsigned long get_safe_page(gfp_t gfp_mask); | ||
37 | #else | 42 | #else |
38 | static inline int software_suspend(void) | 43 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} |
39 | { | 44 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
40 | printk("Warning: fake suspend called\n"); | 45 | static inline void swsusp_set_page_free(struct page *p) {} |
41 | return -ENOSYS; | 46 | static inline void swsusp_unset_page_free(struct page *p) {} |
42 | } | 47 | #endif /* defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) */ |
43 | #endif /* CONFIG_PM */ | ||
44 | 48 | ||
45 | void save_processor_state(void); | 49 | void save_processor_state(void); |
46 | void restore_processor_state(void); | 50 | void restore_processor_state(void); |
47 | struct saved_context; | 51 | struct saved_context; |
48 | void __save_processor_state(struct saved_context *ctxt); | 52 | void __save_processor_state(struct saved_context *ctxt); |
49 | void __restore_processor_state(struct saved_context *ctxt); | 53 | void __restore_processor_state(struct saved_context *ctxt); |
50 | unsigned long get_safe_page(gfp_t gfp_mask); | ||
51 | |||
52 | /* | ||
53 | * XXX: We try to keep some more pages free so that I/O operations succeed | ||
54 | * without paging. Might this be more? | ||
55 | */ | ||
56 | #define PAGES_FOR_IO 1024 | ||
57 | 54 | ||
58 | #endif /* _LINUX_SWSUSP_H */ | 55 | #endif /* _LINUX_SWSUSP_H */ |