1 #include <linux/suspend.h>
2 #include <linux/utsname.h>
4 /* With SUSPEND_CONSOLE defined suspend looks *really* cool, but
5 we probably do not take enough locks for switching consoles, etc,
6 so bad things might happen.
8 #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
9 #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
13 struct new_utsname uts
;
15 unsigned long num_physpages
;
17 unsigned long image_pages
;
20 } __attribute__((aligned(PAGE_SIZE
)));
24 #ifdef CONFIG_SOFTWARE_SUSPEND
25 extern int pm_suspend_disk(void);
28 static inline int pm_suspend_disk(void)
33 extern struct semaphore pm_sem
;
34 #define power_attr(_name) \
35 static struct subsys_attribute _name##_attr = { \
37 .name = __stringify(_name), \
40 .show = _name##_show, \
41 .store = _name##_store, \
44 extern struct subsystem power_subsys
;
46 extern int pm_prepare_console(void);
47 extern void pm_restore_console(void);
49 /* References to section boundaries */
50 extern const void __nosave_begin
, __nosave_end
;
52 extern unsigned int nr_copy_pages
;
53 extern struct pbe
*pagedir_nosave
;
55 /* Preferred image size in MB (default 500) */
56 extern unsigned int image_size
;
58 extern asmlinkage
int swsusp_arch_suspend(void);
59 extern asmlinkage
int swsusp_arch_resume(void);
61 extern unsigned int count_data_pages(void);
62 extern void free_pagedir(struct pbe
*pblist
);
63 extern void release_eaten_pages(void);
64 extern struct pbe
*alloc_pagedir(unsigned nr_pages
, gfp_t gfp_mask
, int safe_needed
);
65 extern void swsusp_free(void);
66 extern int alloc_data_pages(struct pbe
*pblist
, gfp_t gfp_mask
, int safe_needed
);
67 extern unsigned int snapshot_nr_pages(void);
68 extern struct pbe
*snapshot_pblist(void);
69 extern void snapshot_pblist_set(struct pbe
*pblist
);