1 #ifndef _LINUX_SWSUSP_H
2 #define _LINUX_SWSUSP_H
4 #if defined(CONFIG_X86) || defined(CONFIG_FRV)
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>
13 /* page backup entry */
15 unsigned long address; /* address of the copy */
16 unsigned long orig_address; /* original address of page */
17 swp_entry_t swap_address;
18 swp_entry_t dummy; /* we need scratch space at
19 * end of page (see link, diskpage)
23 #define SWAP_FILENAME_MAXLENGTH 32
26 #define SUSPEND_PD_PAGES(x) (((x)*sizeof(struct pbe))/PAGE_SIZE+1)
29 extern int shrink_mem(void);
32 extern void drain_local_pages(void);
33 extern void mark_free_pages(struct zone *zone);
36 /* kernel/power/swsusp.c */
37 extern int software_suspend(void);
39 extern int pm_prepare_console(void);
40 extern void pm_restore_console(void);
43 static inline int software_suspend(void)
45 printk("Warning: fake suspend called\n");
51 extern void disable_nonboot_cpus(void);
52 extern void enable_nonboot_cpus(void);
54 static inline void disable_nonboot_cpus(void) {}
55 static inline void enable_nonboot_cpus(void) {}
58 void save_processor_state(void);
59 void restore_processor_state(void);
61 void __save_processor_state(struct saved_context *ctxt);
62 void __restore_processor_state(struct saved_context *ctxt);
64 #endif /* _LINUX_SWSUSP_H */