aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /kernel/power/power.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
new file mode 100644
index 000000000000..cd6a3493cc0d
--- /dev/null
+++ b/kernel/power/power.h
@@ -0,0 +1,52 @@
1#include <linux/suspend.h>
2#include <linux/utsname.h>
3
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.
7*/
8#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
9#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
10#endif
11
12
13struct swsusp_info {
14 struct new_utsname uts;
15 u32 version_code;
16 unsigned long num_physpages;
17 int cpus;
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)));
23
24
25
26#ifdef CONFIG_SOFTWARE_SUSPEND
27extern int pm_suspend_disk(void);
28
29#else
30static inline int pm_suspend_disk(void)
31{
32 return -EPERM;
33}
34#endif
35extern struct semaphore pm_sem;
36#define power_attr(_name) \
37static struct subsys_attribute _name##_attr = { \
38 .attr = { \
39 .name = __stringify(_name), \
40 .mode = 0644, \
41 }, \
42 .show = _name##_show, \
43 .store = _name##_store, \
44}
45
46extern struct subsystem power_subsys;
47
48extern int freeze_processes(void);
49extern void thaw_processes(void);
50
51extern int pm_prepare_console(void);
52extern void pm_restore_console(void);