Lines Matching refs:cpu
487 int cpu; member
496 c_idle->idle = fork_idle(c_idle->cpu); in do_fork_idle()
501 do_boot_cpu (int sapicid, int cpu) in do_boot_cpu() argument
506 .cpu = cpu, in do_boot_cpu()
514 c_idle.idle = get_idle_for_cpu(cpu); in do_boot_cpu()
516 init_idle(c_idle.idle, cpu); in do_boot_cpu()
524 panic("failed fork for CPU %d", cpu); in do_boot_cpu()
526 set_idle_for_cpu(cpu, c_idle.idle); in do_boot_cpu()
531 Dprintk("Sending wakeup vector %lu to AP 0x%x/0x%x.\n", ap_wakeup_vector, cpu, sapicid); in do_boot_cpu()
533 set_brendez_area(cpu); in do_boot_cpu()
534 platform_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0); in do_boot_cpu()
541 if (cpu_isset(cpu, cpu_callin_map)) in do_boot_cpu()
547 if (!cpu_isset(cpu, cpu_callin_map)) { in do_boot_cpu()
548 printk(KERN_ERR "Processor 0x%x/0x%x is stuck.\n", cpu, sapicid); in do_boot_cpu()
549 ia64_cpu_to_sapicid[cpu] = -1; in do_boot_cpu()
550 set_cpu_online(cpu, false); /* was set in smp_callin() */ in do_boot_cpu()
572 int sapicid, cpu, i; in smp_build_cpu_map() local
575 for (cpu = 0; cpu < NR_CPUS; cpu++) { in smp_build_cpu_map()
576 ia64_cpu_to_sapicid[cpu] = -1; in smp_build_cpu_map()
582 for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) { in smp_build_cpu_map()
586 set_cpu_present(cpu, true); in smp_build_cpu_map()
587 set_cpu_possible(cpu, true); in smp_build_cpu_map()
588 ia64_cpu_to_sapicid[cpu] = sapicid; in smp_build_cpu_map()
589 cpu++; in smp_build_cpu_map()
614 current_thread_info()->cpu = 0; in smp_prepare_cpus()
639 clear_cpu_sibling_map(int cpu) in clear_cpu_sibling_map() argument
643 for_each_cpu_mask(i, per_cpu(cpu_sibling_map, cpu)) in clear_cpu_sibling_map()
644 cpu_clear(cpu, per_cpu(cpu_sibling_map, i)); in clear_cpu_sibling_map()
645 for_each_cpu_mask(i, cpu_core_map[cpu]) in clear_cpu_sibling_map()
646 cpu_clear(cpu, cpu_core_map[i]); in clear_cpu_sibling_map()
648 per_cpu(cpu_sibling_map, cpu) = cpu_core_map[cpu] = CPU_MASK_NONE; in clear_cpu_sibling_map()
652 remove_siblinginfo(int cpu) in remove_siblinginfo() argument
656 if (cpu_data(cpu)->threads_per_core == 1 && in remove_siblinginfo()
657 cpu_data(cpu)->cores_per_socket == 1) { in remove_siblinginfo()
658 cpu_clear(cpu, cpu_core_map[cpu]); in remove_siblinginfo()
659 cpu_clear(cpu, per_cpu(cpu_sibling_map, cpu)); in remove_siblinginfo()
663 last = (cpus_weight(cpu_core_map[cpu]) == 1 ? 1 : 0); in remove_siblinginfo()
666 clear_cpu_sibling_map(cpu); in remove_siblinginfo()
671 int migrate_platform_irqs(unsigned int cpu) in migrate_platform_irqs() argument
681 if (cpe_vector > 0 && is_cpu_cpei_target(cpu)) { in migrate_platform_irqs()
682 printk ("CPU (%d) is CPEI Target\n", cpu); in migrate_platform_irqs()
704 printk ("Unable to retarget CPEI, offline cpu [%d] failed\n", cpu); in migrate_platform_irqs()
714 int cpu = smp_processor_id(); in __cpu_disable() local
719 if (cpu == 0 && !bsp_remove_ok) { in __cpu_disable()
725 if (!sn_cpu_disable_allowed(cpu)) in __cpu_disable()
729 set_cpu_online(cpu, false); in __cpu_disable()
731 if (migrate_platform_irqs(cpu)) { in __cpu_disable()
732 set_cpu_online(cpu, true); in __cpu_disable()
736 remove_siblinginfo(cpu); in __cpu_disable()
739 cpu_clear(cpu, cpu_callin_map); in __cpu_disable()
743 void __cpu_die(unsigned int cpu) in __cpu_die() argument
749 if (per_cpu(cpu_state, cpu) == CPU_DEAD) in __cpu_die()
751 printk ("CPU %d is now offline\n", cpu); in __cpu_die()
756 printk(KERN_ERR "CPU %u didn't die...\n", cpu); in __cpu_die()
763 int cpu; in smp_cpus_done() local
770 for_each_online_cpu(cpu) { in smp_cpus_done()
771 bogosum += cpu_data(cpu)->loops_per_jiffy; in smp_cpus_done()
779 set_cpu_sibling_map(int cpu) in set_cpu_sibling_map() argument
784 if ((cpu_data(cpu)->socket_id == cpu_data(i)->socket_id)) { in set_cpu_sibling_map()
785 cpu_set(i, cpu_core_map[cpu]); in set_cpu_sibling_map()
786 cpu_set(cpu, cpu_core_map[i]); in set_cpu_sibling_map()
787 if (cpu_data(cpu)->core_id == cpu_data(i)->core_id) { in set_cpu_sibling_map()
788 cpu_set(i, per_cpu(cpu_sibling_map, cpu)); in set_cpu_sibling_map()
789 cpu_set(cpu, per_cpu(cpu_sibling_map, i)); in set_cpu_sibling_map()
796 __cpu_up (unsigned int cpu) in __cpu_up() argument
801 sapicid = ia64_cpu_to_sapicid[cpu]; in __cpu_up()
809 if (cpu_isset(cpu, cpu_callin_map)) in __cpu_up()
812 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; in __cpu_up()
814 ret = do_boot_cpu(sapicid, cpu); in __cpu_up()
818 if (cpu_data(cpu)->threads_per_core == 1 && in __cpu_up()
819 cpu_data(cpu)->cores_per_socket == 1) { in __cpu_up()
820 cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); in __cpu_up()
821 cpu_set(cpu, cpu_core_map[cpu]); in __cpu_up()
825 set_cpu_sibling_map(cpu); in __cpu_up()