diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-07-29 17:27:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-29 19:45:38 -0400 |
commit | 296699de6bdc717189a331ab6bbe90e05c94db06 (patch) | |
tree | 53c847ecc8cce11952502921844052e44ca60d5e /kernel/power/Kconfig | |
parent | b0cb1a19d05b8ea8611a9ef48a17fe417f1832e6 (diff) |
Introduce CONFIG_SUSPEND for suspend-to-Ram and standby
Introduce CONFIG_SUSPEND representing the ability to enter system sleep
states, such as the ACPI S3 state, and allow the user to choose SUSPEND
and HIBERNATION independently of each other.
Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has
been chosen and the kernel is intended for SMP systems.
Also, introduce CONFIG_PM_SLEEP which is automatically selected if
CONFIG_SUSPEND or CONFIG_HIBERNATION is set and use it to select the
code needed for both suspend and hibernation.
The top-level power management headers and the ACPI code related to
suspend and hibernation are modified to use the new definitions (the
changes in drivers/acpi/sleep/main.c are, mostly, moving code to reduce
the number of ifdefs).
There are many other files in which CONFIG_PM can be replaced with
CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in
the future.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/Kconfig')
-rw-r--r-- | kernel/power/Kconfig | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index c2582a4a5373..412859f8d94a 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -46,7 +46,7 @@ config PM_VERBOSE | |||
46 | 46 | ||
47 | config DISABLE_CONSOLE_SUSPEND | 47 | config DISABLE_CONSOLE_SUSPEND |
48 | bool "Keep console(s) enabled during suspend/resume (DANGEROUS)" | 48 | bool "Keep console(s) enabled during suspend/resume (DANGEROUS)" |
49 | depends on PM_DEBUG | 49 | depends on PM_DEBUG && PM_SLEEP |
50 | default n | 50 | default n |
51 | ---help--- | 51 | ---help--- |
52 | This option turns off the console suspend mechanism that prevents | 52 | This option turns off the console suspend mechanism that prevents |
@@ -57,7 +57,7 @@ config DISABLE_CONSOLE_SUSPEND | |||
57 | 57 | ||
58 | config PM_TRACE | 58 | config PM_TRACE |
59 | bool "Suspend/resume event tracing" | 59 | bool "Suspend/resume event tracing" |
60 | depends on PM_DEBUG && X86 && EXPERIMENTAL | 60 | depends on PM_DEBUG && X86 && PM_SLEEP && EXPERIMENTAL |
61 | default n | 61 | default n |
62 | ---help--- | 62 | ---help--- |
63 | This enables some cheesy code to save the last PM event point in the | 63 | This enables some cheesy code to save the last PM event point in the |
@@ -72,9 +72,37 @@ config PM_TRACE | |||
72 | CAUTION: this option will cause your machine's real-time clock to be | 72 | CAUTION: this option will cause your machine's real-time clock to be |
73 | set to an invalid time after a resume. | 73 | set to an invalid time after a resume. |
74 | 74 | ||
75 | config SUSPEND_SMP_POSSIBLE | ||
76 | bool | ||
77 | depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC)) | ||
78 | depends on SMP | ||
79 | default y | ||
80 | |||
81 | config SUSPEND_SMP | ||
82 | bool | ||
83 | depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP | ||
84 | select HOTPLUG_CPU | ||
85 | default y | ||
86 | |||
87 | config PM_SLEEP | ||
88 | bool | ||
89 | depends on SUSPEND || HIBERNATION | ||
90 | default y | ||
91 | |||
92 | config SUSPEND | ||
93 | bool "Suspend to RAM and standby" | ||
94 | depends on PM | ||
95 | depends on !SMP || SUSPEND_SMP_POSSIBLE | ||
96 | default y | ||
97 | ---help--- | ||
98 | Allow the system to enter sleep states in which main memory is | ||
99 | powered and thus its contents are preserved, such as the | ||
100 | suspend-to-RAM state (i.e. the ACPI S3 state). | ||
101 | |||
75 | config HIBERNATION | 102 | config HIBERNATION |
76 | bool "Hibernation" | 103 | bool "Hibernation (aka 'suspend to disk')" |
77 | depends on PM && SWAP && (((X86 || PPC64_SWSUSP) && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP)) | 104 | depends on PM && SWAP |
105 | depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || SUSPEND_SMP_POSSIBLE | ||
78 | ---help--- | 106 | ---help--- |
79 | Enable the suspend to disk (STD) functionality, which is usually | 107 | Enable the suspend to disk (STD) functionality, which is usually |
80 | called "hibernation" in user interfaces. STD checkpoints the | 108 | called "hibernation" in user interfaces. STD checkpoints the |
@@ -132,11 +160,6 @@ config PM_STD_PARTITION | |||
132 | suspended image to. It will simply pick the first available swap | 160 | suspended image to. It will simply pick the first available swap |
133 | device. | 161 | device. |
134 | 162 | ||
135 | config SUSPEND_SMP | ||
136 | bool | ||
137 | depends on HOTPLUG_CPU && (X86 || PPC64) && PM | ||
138 | default y | ||
139 | |||
140 | config APM_EMULATION | 163 | config APM_EMULATION |
141 | tristate "Advanced Power Management Emulation" | 164 | tristate "Advanced Power Management Emulation" |
142 | depends on PM && SYS_SUPPORTS_APM_EMULATION | 165 | depends on PM && SYS_SUPPORTS_APM_EMULATION |