aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-05-09 05:35:11 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:56 -0400
commit455c017ae3934797653549704c286e7bcc3a9397 (patch)
tree7b5b67916b064e3ce7868082e0915f37b437aeb8 /kernel/cpu.c
parent8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d (diff)
microcode: use suspend-related CPU hotplug notifications
Make the microcode driver use the suspend-related CPU hotplug notifications to handle the CPU hotplug events occuring during system-wide suspend and resume transitions. Remove the global variable suspend_cpu_hotplug previously used for this purpose. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Gautham R Shenoy <ego@in.ibm.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 369d2892687d..208cf3497c10 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -262,12 +262,6 @@ int __cpuinit cpu_up(unsigned int cpu)
262} 262}
263 263
264#ifdef CONFIG_SUSPEND_SMP 264#ifdef CONFIG_SUSPEND_SMP
265/* Needed to prevent the microcode driver from requesting firmware in its CPU
266 * hotplug notifier during the suspend/resume.
267 */
268int suspend_cpu_hotplug;
269EXPORT_SYMBOL(suspend_cpu_hotplug);
270
271static cpumask_t frozen_cpus; 265static cpumask_t frozen_cpus;
272 266
273int disable_nonboot_cpus(void) 267int disable_nonboot_cpus(void)
@@ -275,7 +269,6 @@ int disable_nonboot_cpus(void)
275 int cpu, first_cpu, error = 0; 269 int cpu, first_cpu, error = 0;
276 270
277 mutex_lock(&cpu_add_remove_lock); 271 mutex_lock(&cpu_add_remove_lock);
278 suspend_cpu_hotplug = 1;
279 first_cpu = first_cpu(cpu_online_map); 272 first_cpu = first_cpu(cpu_online_map);
280 /* We take down all of the non-boot CPUs in one shot to avoid races 273 /* We take down all of the non-boot CPUs in one shot to avoid races
281 * with the userspace trying to use the CPU hotplug at the same time 274 * with the userspace trying to use the CPU hotplug at the same time
@@ -302,7 +295,6 @@ int disable_nonboot_cpus(void)
302 } else { 295 } else {
303 printk(KERN_ERR "Non-boot CPUs are not disabled\n"); 296 printk(KERN_ERR "Non-boot CPUs are not disabled\n");
304 } 297 }
305 suspend_cpu_hotplug = 0;
306 mutex_unlock(&cpu_add_remove_lock); 298 mutex_unlock(&cpu_add_remove_lock);
307 return error; 299 return error;
308} 300}
@@ -317,7 +309,6 @@ void enable_nonboot_cpus(void)
317 if (cpus_empty(frozen_cpus)) 309 if (cpus_empty(frozen_cpus))
318 goto out; 310 goto out;
319 311
320 suspend_cpu_hotplug = 1;
321 printk("Enabling non-boot CPUs ...\n"); 312 printk("Enabling non-boot CPUs ...\n");
322 for_each_cpu_mask(cpu, frozen_cpus) { 313 for_each_cpu_mask(cpu, frozen_cpus) {
323 error = _cpu_up(cpu, 1); 314 error = _cpu_up(cpu, 1);
@@ -328,7 +319,6 @@ void enable_nonboot_cpus(void)
328 printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error); 319 printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
329 } 320 }
330 cpus_clear(frozen_cpus); 321 cpus_clear(frozen_cpus);
331 suspend_cpu_hotplug = 0;
332out: 322out:
333 mutex_unlock(&cpu_add_remove_lock); 323 mutex_unlock(&cpu_add_remove_lock);
334} 324}