diff options
Diffstat (limited to 'arch/ia64/kernel/smpboot.c')
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 6a1380e90f87..d003b502a432 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -390,13 +390,11 @@ smp_callin (void) | |||
390 | 390 | ||
391 | fix_b0_for_bsp(); | 391 | fix_b0_for_bsp(); |
392 | 392 | ||
393 | #ifdef CONFIG_NUMA | ||
394 | /* | 393 | /* |
395 | * numa_node_id() works after this. | 394 | * numa_node_id() works after this. |
396 | */ | 395 | */ |
397 | set_numa_node(cpu_to_node_map[cpuid]); | 396 | set_numa_node(cpu_to_node_map[cpuid]); |
398 | set_numa_mem(local_memory_node(cpu_to_node_map[cpuid])); | 397 | set_numa_mem(local_memory_node(cpu_to_node_map[cpuid])); |
399 | #endif | ||
400 | 398 | ||
401 | ipi_call_lock_irq(); | 399 | ipi_call_lock_irq(); |
402 | spin_lock(&vector_lock); | 400 | spin_lock(&vector_lock); |
@@ -510,21 +508,18 @@ do_boot_cpu (int sapicid, int cpu) | |||
510 | .done = COMPLETION_INITIALIZER(c_idle.done), | 508 | .done = COMPLETION_INITIALIZER(c_idle.done), |
511 | }; | 509 | }; |
512 | 510 | ||
511 | /* | ||
512 | * We can't use kernel_thread since we must avoid to | ||
513 | * reschedule the child. | ||
514 | */ | ||
513 | c_idle.idle = get_idle_for_cpu(cpu); | 515 | c_idle.idle = get_idle_for_cpu(cpu); |
514 | if (c_idle.idle) { | 516 | if (c_idle.idle) { |
515 | init_idle(c_idle.idle, cpu); | 517 | init_idle(c_idle.idle, cpu); |
516 | goto do_rest; | 518 | goto do_rest; |
517 | } | 519 | } |
518 | 520 | ||
519 | /* | 521 | schedule_work(&c_idle.work); |
520 | * We can't use kernel_thread since we must avoid to reschedule the child. | 522 | wait_for_completion(&c_idle.done); |
521 | */ | ||
522 | if (!keventd_up() || current_is_keventd()) | ||
523 | c_idle.work.func(&c_idle.work); | ||
524 | else { | ||
525 | schedule_work(&c_idle.work); | ||
526 | wait_for_completion(&c_idle.done); | ||
527 | } | ||
528 | 523 | ||
529 | if (IS_ERR(c_idle.idle)) | 524 | if (IS_ERR(c_idle.idle)) |
530 | panic("failed fork for CPU %d", cpu); | 525 | panic("failed fork for CPU %d", cpu); |
@@ -640,9 +635,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
640 | { | 635 | { |
641 | cpu_set(smp_processor_id(), cpu_online_map); | 636 | cpu_set(smp_processor_id(), cpu_online_map); |
642 | cpu_set(smp_processor_id(), cpu_callin_map); | 637 | cpu_set(smp_processor_id(), cpu_callin_map); |
643 | #ifdef CONFIG_NUMA | ||
644 | set_numa_node(cpu_to_node_map[smp_processor_id()]); | 638 | set_numa_node(cpu_to_node_map[smp_processor_id()]); |
645 | #endif | ||
646 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 639 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
647 | paravirt_post_smp_prepare_boot_cpu(); | 640 | paravirt_post_smp_prepare_boot_cpu(); |
648 | } | 641 | } |