aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/smpboot.c
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2012-03-28 17:42:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 20:14:36 -0400
commit7d7f98488b203cbf78538698cf5d937f670d96d3 (patch)
tree049ace6ae981d1144f4cd469abf83a6a71c9d8fe /arch/ia64/kernel/smpboot.c
parent38b93780a5381961ad92d24ab9a12a964189a3a4 (diff)
arch/ia64: remove references to cpu_*_map
This was marked as obsolete for quite a while now.. Now it is time to remove it altogether. And while doing this, get rid of first_cpu() as well. Also, remove the redundant setting of cpu_online_mask in smp_prepare_cpus() because the generic code would have already set cpu 0 in cpu_online_mask. Reported-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/kernel/smpboot.c')
-rw-r--r--arch/ia64/kernel/smpboot.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 559097986672..90916beddf07 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -401,7 +401,7 @@ smp_callin (void)
401 /* Setup the per cpu irq handling data structures */ 401 /* Setup the per cpu irq handling data structures */
402 __setup_vector_irq(cpuid); 402 __setup_vector_irq(cpuid);
403 notify_cpu_starting(cpuid); 403 notify_cpu_starting(cpuid);
404 cpu_set(cpuid, cpu_online_map); 404 set_cpu_online(cpuid, true);
405 per_cpu(cpu_state, cpuid) = CPU_ONLINE; 405 per_cpu(cpu_state, cpuid) = CPU_ONLINE;
406 spin_unlock(&vector_lock); 406 spin_unlock(&vector_lock);
407 ipi_call_unlock_irq(); 407 ipi_call_unlock_irq();
@@ -548,7 +548,7 @@ do_rest:
548 if (!cpu_isset(cpu, cpu_callin_map)) { 548 if (!cpu_isset(cpu, cpu_callin_map)) {
549 printk(KERN_ERR "Processor 0x%x/0x%x is stuck.\n", cpu, sapicid); 549 printk(KERN_ERR "Processor 0x%x/0x%x is stuck.\n", cpu, sapicid);
550 ia64_cpu_to_sapicid[cpu] = -1; 550 ia64_cpu_to_sapicid[cpu] = -1;
551 cpu_clear(cpu, cpu_online_map); /* was set in smp_callin() */ 551 set_cpu_online(cpu, false); /* was set in smp_callin() */
552 return -EINVAL; 552 return -EINVAL;
553 } 553 }
554 return 0; 554 return 0;
@@ -578,8 +578,7 @@ smp_build_cpu_map (void)
578 } 578 }
579 579
580 ia64_cpu_to_sapicid[0] = boot_cpu_id; 580 ia64_cpu_to_sapicid[0] = boot_cpu_id;
581 cpus_clear(cpu_present_map); 581 init_cpu_present(cpumask_of(0));
582 set_cpu_present(0, true);
583 set_cpu_possible(0, true); 582 set_cpu_possible(0, true);
584 for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) { 583 for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) {
585 sapicid = smp_boot_data.cpu_phys_id[i]; 584 sapicid = smp_boot_data.cpu_phys_id[i];
@@ -606,10 +605,6 @@ smp_prepare_cpus (unsigned int max_cpus)
606 605
607 smp_setup_percpu_timer(); 606 smp_setup_percpu_timer();
608 607
609 /*
610 * We have the boot CPU online for sure.
611 */
612 cpu_set(0, cpu_online_map);
613 cpu_set(0, cpu_callin_map); 608 cpu_set(0, cpu_callin_map);
614 609
615 local_cpu_data->loops_per_jiffy = loops_per_jiffy; 610 local_cpu_data->loops_per_jiffy = loops_per_jiffy;
@@ -633,7 +628,7 @@ smp_prepare_cpus (unsigned int max_cpus)
633 628
634void __devinit smp_prepare_boot_cpu(void) 629void __devinit smp_prepare_boot_cpu(void)
635{ 630{
636 cpu_set(smp_processor_id(), cpu_online_map); 631 set_cpu_online(smp_processor_id(), true);
637 cpu_set(smp_processor_id(), cpu_callin_map); 632 cpu_set(smp_processor_id(), cpu_callin_map);
638 set_numa_node(cpu_to_node_map[smp_processor_id()]); 633 set_numa_node(cpu_to_node_map[smp_processor_id()]);
639 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 634 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
@@ -690,7 +685,7 @@ int migrate_platform_irqs(unsigned int cpu)
690 /* 685 /*
691 * Now re-target the CPEI to a different processor 686 * Now re-target the CPEI to a different processor
692 */ 687 */
693 new_cpei_cpu = any_online_cpu(cpu_online_map); 688 new_cpei_cpu = cpumask_any(cpu_online_mask);
694 mask = cpumask_of(new_cpei_cpu); 689 mask = cpumask_of(new_cpei_cpu);
695 set_cpei_target_cpu(new_cpei_cpu); 690 set_cpei_target_cpu(new_cpei_cpu);
696 data = irq_get_irq_data(ia64_cpe_irq); 691 data = irq_get_irq_data(ia64_cpe_irq);
@@ -732,10 +727,10 @@ int __cpu_disable(void)
732 return -EBUSY; 727 return -EBUSY;
733 } 728 }
734 729
735 cpu_clear(cpu, cpu_online_map); 730 set_cpu_online(cpu, false);
736 731
737 if (migrate_platform_irqs(cpu)) { 732 if (migrate_platform_irqs(cpu)) {
738 cpu_set(cpu, cpu_online_map); 733 set_cpu_online(cpu, true);
739 return -EBUSY; 734 return -EBUSY;
740 } 735 }
741 736