diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-08-31 02:56:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-31 04:42:22 -0400 |
commit | f3de4be9d5f8551d7880a1f1f5231a30e0161b1f (patch) | |
tree | 9ebd397e6b253d144460f061b95ded60a7b0da0b /kernel | |
parent | b07e35f94a7b6a059f889b904529ee907dc0634d (diff) |
PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION
Dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION introduced by commit
296699de6bdc717189a331ab6bbe90e05c94db06 "Introduce CONFIG_SUSPEND for
suspend-to-Ram and standby" are incorrect, as they don't cover the facts that
(1) not all architectures support suspend and (2) SMP hibernation is only
possible on X86 and PPC64 (if CONFIG_PPC64_SWSUSP is set).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpu.c | 4 | ||||
-rw-r--r-- | kernel/power/Kconfig | 41 |
2 files changed, 33 insertions, 12 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 181ae7086029..38033db8d8ec 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -273,7 +273,7 @@ int __cpuinit cpu_up(unsigned int cpu) | |||
273 | return err; | 273 | return err; |
274 | } | 274 | } |
275 | 275 | ||
276 | #ifdef CONFIG_SUSPEND_SMP | 276 | #ifdef CONFIG_PM_SLEEP_SMP |
277 | static cpumask_t frozen_cpus; | 277 | static cpumask_t frozen_cpus; |
278 | 278 | ||
279 | int disable_nonboot_cpus(void) | 279 | int disable_nonboot_cpus(void) |
@@ -334,4 +334,4 @@ void enable_nonboot_cpus(void) | |||
334 | out: | 334 | out: |
335 | mutex_unlock(&cpu_add_remove_lock); | 335 | mutex_unlock(&cpu_add_remove_lock); |
336 | } | 336 | } |
337 | #endif | 337 | #endif /* CONFIG_PM_SLEEP_SMP */ |
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 412859f8d94a..c8580a1e6873 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -72,15 +72,10 @@ 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 | 75 | config PM_SLEEP_SMP |
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 | 76 | bool |
83 | depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP | 77 | depends on SUSPEND_SMP_POSSIBLE || HIBERNATION_SMP_POSSIBLE |
78 | depends on PM_SLEEP | ||
84 | select HOTPLUG_CPU | 79 | select HOTPLUG_CPU |
85 | default y | 80 | default y |
86 | 81 | ||
@@ -89,20 +84,46 @@ config PM_SLEEP | |||
89 | depends on SUSPEND || HIBERNATION | 84 | depends on SUSPEND || HIBERNATION |
90 | default y | 85 | default y |
91 | 86 | ||
87 | config SUSPEND_UP_POSSIBLE | ||
88 | bool | ||
89 | depends on (X86 && !X86_VOYAGER) || PPC || ARM || BLACKFIN || MIPS \ | ||
90 | || SUPERH || FRV | ||
91 | depends on !SMP | ||
92 | default y | ||
93 | |||
94 | config SUSPEND_SMP_POSSIBLE | ||
95 | bool | ||
96 | depends on (X86 && !X86_VOYAGER) \ | ||
97 | || (PPC && (PPC_PSERIES || PPC_PMAC)) || ARM | ||
98 | depends on SMP | ||
99 | default y | ||
100 | |||
92 | config SUSPEND | 101 | config SUSPEND |
93 | bool "Suspend to RAM and standby" | 102 | bool "Suspend to RAM and standby" |
94 | depends on PM | 103 | depends on PM |
95 | depends on !SMP || SUSPEND_SMP_POSSIBLE | 104 | depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE |
96 | default y | 105 | default y |
97 | ---help--- | 106 | ---help--- |
98 | Allow the system to enter sleep states in which main memory is | 107 | Allow the system to enter sleep states in which main memory is |
99 | powered and thus its contents are preserved, such as the | 108 | powered and thus its contents are preserved, such as the |
100 | suspend-to-RAM state (i.e. the ACPI S3 state). | 109 | suspend-to-RAM state (i.e. the ACPI S3 state). |
101 | 110 | ||
111 | config HIBERNATION_UP_POSSIBLE | ||
112 | bool | ||
113 | depends on X86 || PPC64_SWSUSP || FRV || PPC32 | ||
114 | depends on !SMP | ||
115 | default y | ||
116 | |||
117 | config HIBERNATION_SMP_POSSIBLE | ||
118 | bool | ||
119 | depends on (X86 && !X86_VOYAGER) || PPC64_SWSUSP | ||
120 | depends on SMP | ||
121 | default y | ||
122 | |||
102 | config HIBERNATION | 123 | config HIBERNATION |
103 | bool "Hibernation (aka 'suspend to disk')" | 124 | bool "Hibernation (aka 'suspend to disk')" |
104 | depends on PM && SWAP | 125 | depends on PM && SWAP |
105 | depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || SUSPEND_SMP_POSSIBLE | 126 | depends on HIBERNATION_UP_POSSIBLE || HIBERNATION_SMP_POSSIBLE |
106 | ---help--- | 127 | ---help--- |
107 | Enable the suspend to disk (STD) functionality, which is usually | 128 | Enable the suspend to disk (STD) functionality, which is usually |
108 | called "hibernation" in user interfaces. STD checkpoints the | 129 | called "hibernation" in user interfaces. STD checkpoints the |