1 #ifndef _LINUX_SWSUSP_H
2 #define _LINUX_SWSUSP_H
5 #include <asm/suspend.h>
7 #include <linux/swap.h>
8 #include <linux/notifier.h>
9 #include <linux/config.h>
10 #include <linux/init.h>
14 /* page backup entry */
16 unsigned long address
; /* address of the copy */
17 unsigned long orig_address
; /* original address of page */
18 swp_entry_t swap_address
;
19 swp_entry_t dummy
; /* we need scratch space at
20 * end of page (see link, diskpage)
24 #define SWAP_FILENAME_MAXLENGTH 32
27 #define SUSPEND_PD_PAGES(x) (((x)*sizeof(struct pbe))/PAGE_SIZE+1)
30 extern int shrink_mem(void);
33 extern void drain_local_pages(void);
35 /* kernel/power/swsusp.c */
36 extern int software_suspend(void);
38 #else /* CONFIG_SOFTWARE_SUSPEND */
39 static inline int software_suspend(void)
41 printk("Warning: fake suspend called\n");
44 #endif /* CONFIG_SOFTWARE_SUSPEND */
48 extern void refrigerator(unsigned long);
49 extern int freeze_processes(void);
50 extern void thaw_processes(void);
52 extern int pm_prepare_console(void);
53 extern void pm_restore_console(void);
56 static inline void refrigerator(unsigned long flag
) {}
57 #endif /* CONFIG_PM */
60 extern void disable_nonboot_cpus(void);
61 extern void enable_nonboot_cpus(void);
63 static inline void disable_nonboot_cpus(void) {}
64 static inline void enable_nonboot_cpus(void) {}
67 void save_processor_state(void);
68 void restore_processor_state(void);
70 void __save_processor_state(struct saved_context
*ctxt
);
71 void __restore_processor_state(struct saved_context
*ctxt
);
73 #endif /* _LINUX_SWSUSP_H */