1 #include <linux/suspend.h>
2 #include <linux/utsname.h>
4 /* With SUSPEND_CONSOLE defined, it 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)
14 struct new_utsname uts
;
16 unsigned long num_physpages
;
18 unsigned long image_pages
;
19 unsigned long pagedir_pages
;
20 suspend_pagedir_t
* suspend_pagedir
;
21 swp_entry_t pagedir
[768];
22 } __attribute__((aligned(PAGE_SIZE
)));
26 #ifdef CONFIG_SOFTWARE_SUSPEND
27 extern int pm_suspend_disk(void);
30 static inline int pm_suspend_disk(void)
35 extern struct semaphore pm_sem
;
36 #define power_attr(_name) \
37 static struct subsys_attribute _name##_attr = { \
39 .name = __stringify(_name), \
42 .show = _name##_show, \
43 .store = _name##_store, \
46 extern struct subsystem power_subsys
;
48 extern int freeze_processes(void);
49 extern void thaw_processes(void);
51 extern int pm_prepare_console(void);
52 extern void pm_restore_console(void);