diff options
-rw-r--r-- | arch/x86_64/defconfig | 1 | ||||
-rw-r--r-- | include/linux/cpu.h | 6 | ||||
-rw-r--r-- | kernel/cpu.c | 4 | ||||
-rw-r--r-- | kernel/power/Kconfig | 41 |
4 files changed, 36 insertions, 16 deletions
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index e64f65c9d901..b091c5e35558 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -201,7 +201,6 @@ CONFIG_PM=y | |||
201 | # CONFIG_PM_DEBUG is not set | 201 | # CONFIG_PM_DEBUG is not set |
202 | CONFIG_HIBERNATION=y | 202 | CONFIG_HIBERNATION=y |
203 | CONFIG_PM_STD_PARTITION="" | 203 | CONFIG_PM_STD_PARTITION="" |
204 | CONFIG_SUSPEND_SMP=y | ||
205 | 204 | ||
206 | # | 205 | # |
207 | # ACPI (Advanced Configuration and Power Interface) Support | 206 | # ACPI (Advanced Configuration and Power Interface) Support |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1d5ded0836ee..0ad72c4cf312 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -126,16 +126,16 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
126 | static inline int cpu_is_offline(int cpu) { return 0; } | 126 | static inline int cpu_is_offline(int cpu) { return 0; } |
127 | #endif /* CONFIG_HOTPLUG_CPU */ | 127 | #endif /* CONFIG_HOTPLUG_CPU */ |
128 | 128 | ||
129 | #ifdef CONFIG_SUSPEND_SMP | 129 | #ifdef CONFIG_PM_SLEEP_SMP |
130 | extern int suspend_cpu_hotplug; | 130 | extern int suspend_cpu_hotplug; |
131 | 131 | ||
132 | extern int disable_nonboot_cpus(void); | 132 | extern int disable_nonboot_cpus(void); |
133 | extern void enable_nonboot_cpus(void); | 133 | extern void enable_nonboot_cpus(void); |
134 | #else | 134 | #else /* !CONFIG_PM_SLEEP_SMP */ |
135 | #define suspend_cpu_hotplug 0 | 135 | #define suspend_cpu_hotplug 0 |
136 | 136 | ||
137 | static inline int disable_nonboot_cpus(void) { return 0; } | 137 | static inline int disable_nonboot_cpus(void) { return 0; } |
138 | static inline void enable_nonboot_cpus(void) {} | 138 | static inline void enable_nonboot_cpus(void) {} |
139 | #endif | 139 | #endif /* !CONFIG_PM_SLEEP_SMP */ |
140 | 140 | ||
141 | #endif /* _LINUX_CPU_H_ */ | 141 | #endif /* _LINUX_CPU_H_ */ |
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 |