diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 156f87582c6c..25e28087a3ee 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -325,7 +325,7 @@ void stop_this_cpu(void *dummy) | |||
325 | /* | 325 | /* |
326 | * Remove this CPU: | 326 | * Remove this CPU: |
327 | */ | 327 | */ |
328 | cpu_clear(smp_processor_id(), cpu_online_map); | 328 | set_cpu_online(smp_processor_id(), false); |
329 | disable_local_APIC(); | 329 | disable_local_APIC(); |
330 | 330 | ||
331 | for (;;) { | 331 | for (;;) { |
@@ -475,12 +475,13 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | |||
475 | return 1; | 475 | return 1; |
476 | } | 476 | } |
477 | 477 | ||
478 | static cpumask_t c1e_mask = CPU_MASK_NONE; | 478 | static cpumask_var_t c1e_mask; |
479 | static int c1e_detected; | 479 | static int c1e_detected; |
480 | 480 | ||
481 | void c1e_remove_cpu(int cpu) | 481 | void c1e_remove_cpu(int cpu) |
482 | { | 482 | { |
483 | cpu_clear(cpu, c1e_mask); | 483 | if (c1e_mask != NULL) |
484 | cpumask_clear_cpu(cpu, c1e_mask); | ||
484 | } | 485 | } |
485 | 486 | ||
486 | /* | 487 | /* |
@@ -509,8 +510,8 @@ static void c1e_idle(void) | |||
509 | if (c1e_detected) { | 510 | if (c1e_detected) { |
510 | int cpu = smp_processor_id(); | 511 | int cpu = smp_processor_id(); |
511 | 512 | ||
512 | if (!cpu_isset(cpu, c1e_mask)) { | 513 | if (!cpumask_test_cpu(cpu, c1e_mask)) { |
513 | cpu_set(cpu, c1e_mask); | 514 | cpumask_set_cpu(cpu, c1e_mask); |
514 | /* | 515 | /* |
515 | * Force broadcast so ACPI can not interfere. Needs | 516 | * Force broadcast so ACPI can not interfere. Needs |
516 | * to run with interrupts enabled as it uses | 517 | * to run with interrupts enabled as it uses |
@@ -562,6 +563,15 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) | |||
562 | pm_idle = default_idle; | 563 | pm_idle = default_idle; |
563 | } | 564 | } |
564 | 565 | ||
566 | void __init init_c1e_mask(void) | ||
567 | { | ||
568 | /* If we're using c1e_idle, we need to allocate c1e_mask. */ | ||
569 | if (pm_idle == c1e_idle) { | ||
570 | alloc_cpumask_var(&c1e_mask, GFP_KERNEL); | ||
571 | cpumask_clear(c1e_mask); | ||
572 | } | ||
573 | } | ||
574 | |||
565 | static int __init idle_setup(char *str) | 575 | static int __init idle_setup(char *str) |
566 | { | 576 | { |
567 | if (!str) | 577 | if (!str) |