Lines Matching +full:startup +full:- +full:time +full:- +full:ms

1 // SPDX-License-Identifier: GPL-2.0-or-later
13 * Pentium Pro and Pentium-II/Xeon MP machines.
19 * Alan Cox : By repeated request 8) - Total BogoMIPS report.
32 * Martin J. Bligh : Added support for multi-quad systems
84 #include <asm/intel-family.h>
86 #include <asm/spec-ctrl.h>
171 if (!--smpboot_warm_reset_vector_count) { in smpboot_restore_warm_reset_vector()
249 * 32-bit specific. 64-bit reaches this code with the correct page in start_secondary()
261 * 32-bit systems load the microcode from the ASM startup code for in start_secondary()
264 * On 64-bit systems load it before reaching the AP alive in start_secondary()
284 * synchronization state to ALIVE and spin-waits for the control CPU to in start_secondary()
330 * topology_phys_to_logical_pkg - Map a physical package id to a logical
333 * Returns logical package id or -1 if not found
342 if (c->initialized && c->phys_proc_id == phys_pkg) in topology_phys_to_logical_pkg()
343 return c->logical_proc_id; in topology_phys_to_logical_pkg()
345 return -1; in topology_phys_to_logical_pkg()
350 * topology_phys_to_logical_die - Map a physical die id to logical
354 * Returns logical die id or -1 if not found
363 if (c->initialized && c->cpu_die_id == die_id && in topology_phys_to_logical_die()
364 c->phys_proc_id == proc_id) in topology_phys_to_logical_die()
365 return c->logical_die_id; in topology_phys_to_logical_die()
367 return -1; in topology_phys_to_logical_die()
371 * topology_update_package_map - Update the physical to logical package map
394 * topology_update_die_map - Update the physical to logical die map
423 c->cpu_index = id; in smp_store_boot_cpu_info()
424 topology_update_package_map(c->phys_proc_id, id); in smp_store_boot_cpu_info()
425 topology_update_die_map(c->cpu_die_id, id); in smp_store_boot_cpu_info()
426 c->initialized = true; in smp_store_boot_cpu_info()
438 if (!c->initialized) in smp_store_cpu_info()
440 c->cpu_index = id; in smp_store_cpu_info()
442 * During boot time, CPU0 has this setup already. Save the info when in smp_store_cpu_info()
446 c->initialized = true; in smp_store_cpu_info()
452 int cpu1 = c->cpu_index, cpu2 = o->cpu_index; in topology_same_node()
460 int cpu1 = c->cpu_index, cpu2 = o->cpu_index; in topology_sane()
463 "sched: CPU #%d's %s-sibling CPU #%d is not on the same node! " in topology_sane()
477 int cpu1 = c->cpu_index, cpu2 = o->cpu_index; in match_smt()
479 if (c->phys_proc_id == o->phys_proc_id && in match_smt()
480 c->cpu_die_id == o->cpu_die_id && in match_smt()
482 if (c->cpu_core_id == o->cpu_core_id) in match_smt()
485 if ((c->cu_id != 0xff) && in match_smt()
486 (o->cu_id != 0xff) && in match_smt()
487 (c->cu_id == o->cu_id)) in match_smt()
491 } else if (c->phys_proc_id == o->phys_proc_id && in match_smt()
492 c->cpu_die_id == o->cpu_die_id && in match_smt()
493 c->cpu_core_id == o->cpu_core_id) { in match_smt()
502 if (c->phys_proc_id == o->phys_proc_id && in match_die()
503 c->cpu_die_id == o->cpu_die_id) in match_die()
510 int cpu1 = c->cpu_index, cpu2 = o->cpu_index; in match_l2c()
530 if (c->phys_proc_id == o->phys_proc_id) in match_pkg()
536 * Define intel_cod_cpu[] for Intel COD (Cluster-on-Die) CPUs.
539 * match intel_cod_cpu[] has the SNC (Sub-NUMA Cluster) topology.
542 * by multiple NUMA nodes. The LLC is shared for off-package data
544 * on-package access. CPUID (the source of the information about
559 int cpu1 = c->cpu_index, cpu2 = o->cpu_index; in match_llc()
560 bool intel_snc = id && id->driver_data; in match_llc()
616 * AMD Magny-Cours, Intel Cluster-on-Die, and Intel
617 * Sub-NUMA Clustering have this.
644 * since the NUMA domains will auto-magically create the right spanning in build_sched_topology()
656 BUG_ON(i >= ARRAY_SIZE(x86_topology)-1); in build_sched_topology()
677 c->booted_cores = 1; in set_cpu_sibling_map()
709 * topology_sibling_cpumask links to be set-up. in set_cpu_sibling_map()
727 c->booted_cores++; in set_cpu_sibling_map()
734 } else if (i != cpu && !c->booted_cores) in set_cpu_sibling_map()
735 c->booted_cores = cpu_data(i).booted_cores; in set_cpu_sibling_map()
740 /* maps the cpu to the sched domain representing multi-core */
767 pr_debug("Before bogocount - setting activated=1\n"); in impress_friends()
772 * that there should be a 10ms delay between the BSP asserting INIT
773 * and de-asserting INIT, when starting a remote processor.
777 * Cmdline "init_cpu_udelay=" is available to over-ride this delay.
810 * Wake up AP by INIT, INIT, STARTUP sequence.
836 * Wake up AP by INIT, INIT, STARTUP sequence.
850 * Should we send STARTUP IPIs ? in wakeup_secondary_cpu_via_init()
853 * If we don't have an integrated APIC, don't send the STARTUP IPIs. in wakeup_secondary_cpu_via_init()
861 * Run STARTUP IPI loop. in wakeup_secondary_cpu_via_init()
863 pr_debug("#startup loops: %d\n", num_starts); in wakeup_secondary_cpu_via_init()
866 pr_debug("Sending STARTUP #%d\n", j); in wakeup_secondary_cpu_via_init()
873 * STARTUP IPI in wakeup_secondary_cpu_via_init()
883 * Give the other CPU some time to accept the IPI. in wakeup_secondary_cpu_via_init()
890 pr_debug("Startup point 1\n"); in wakeup_secondary_cpu_via_init()
896 * Give the other CPU some time to accept the IPI. in wakeup_secondary_cpu_via_init()
909 pr_debug("After Startup\n"); in wakeup_secondary_cpu_via_init()
938 if (current_node > (-1)) in announce_cpu()
943 node_width - num_digits(node), " ", node); in announce_cpu()
951 pr_cont("%*s#%d", width - num_digits(cpu), " ", cpu); in announce_cpu()
980 * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
982 * Returns zero if startup was successfully sent, else error code from
983 * ->wakeup_secondary_cpu.
987 unsigned long start_ip = real_mode_header->trampoline_start; in do_boot_cpu()
991 /* If 64-bit wakeup method exists, use the 64-bit mode trampoline IP */ in do_boot_cpu()
992 if (apic->wakeup_secondary_cpu_64) in do_boot_cpu()
993 start_ip = real_mode_header->trampoline_start64; in do_boot_cpu()
995 idle->thread.sp = (unsigned long)task_pt_regs(idle); in do_boot_cpu()
1000 initial_stack = idle->thread.sp; in do_boot_cpu()
1012 * This grunge runs the startup process for in do_boot_cpu()
1033 * - Use a method from the APIC driver if one defined, with wakeup in do_boot_cpu()
1034 * straight to 64-bit mode preferred over wakeup to RM. in do_boot_cpu()
1036 * - Use an INIT boot APIC message in do_boot_cpu()
1038 if (apic->wakeup_secondary_cpu_64) in do_boot_cpu()
1039 ret = apic->wakeup_secondary_cpu_64(apicid, start_ip); in do_boot_cpu()
1040 else if (apic->wakeup_secondary_cpu) in do_boot_cpu()
1041 ret = apic->wakeup_secondary_cpu(apicid, start_ip); in do_boot_cpu()
1053 int apicid = apic->cpu_present_to_apicid(cpu); in native_kick_ap()
1058 pr_debug("++++++++++++++++++++=_---CPU UP %u\n", cpu); in native_kick_ap()
1063 return -EINVAL; in native_kick_ap()
1114 * arch_disable_smp_support() - Disables SMP support for x86 at boottime
1124 * RED-PEN audit/test this more. I bet there is more state messed up here.
1152 c->cpu_index = nr_cpu_ids; in smp_cpu_index_default()
1184 pr_info("Parallel CPU startup disabled by the platform\n"); in arch_cpuhp_init_parallel_bringup()
1189 pr_debug("Parallel CPU startup enabled: 0x%08x\n", smpboot_control); in arch_cpuhp_init_parallel_bringup()
1281 static int __initdata setup_possible_cpus = -1;
1292 * are onlined, or offlined. The reason is per-cpu data-structures
1293 * are allocated by some modules at init time, and don't expect to
1298 * - Ashok Raj
1301 * - If the BIOS specified disabled CPUs in ACPI/mptables use that.
1302 * - The user can overwrite it with possible_cpus=NUM
1303 * - Otherwise don't reserve additional CPUs.
1305 * -AK
1312 if (setup_possible_cpus == -1) { in prefill_possible_map()
1345 possible, max_t(int, possible - num_processors, 0)); in prefill_possible_map()
1387 cpu_data(sibling).booted_cores--; in remove_siblinginfo()
1408 c->cpu_core_id = 0; in remove_siblinginfo()
1409 c->booted_cores = 0; in remove_siblinginfo()
1517 (highest_subcstate - 1); in mwait_play_dead()
1521 md->status = CPUDEAD_MWAIT_WAIT; in mwait_play_dead()
1522 md->control = CPUDEAD_MWAIT_WAIT; in mwait_play_dead()
1531 * The WBINVD is insufficient due to the spurious-wakeup in mwait_play_dead()
1541 if (READ_ONCE(md->control) == CPUDEAD_MWAIT_KEXEC_HLT) { in mwait_play_dead()
1554 WRITE_ONCE(md->status, CPUDEAD_MWAIT_KEXEC_HLT); in mwait_play_dead()
1575 if (READ_ONCE(md->status) != CPUDEAD_MWAIT_WAIT) in smp_kick_mwait_play_dead()
1578 /* Wait up to 5ms */ in smp_kick_mwait_play_dead()
1579 for (i = 0; READ_ONCE(md->status) != newstate && i < 1000; i++) { in smp_kick_mwait_play_dead()
1581 WRITE_ONCE(md->control, newstate); in smp_kick_mwait_play_dead()
1585 if (READ_ONCE(md->status) != newstate) in smp_kick_mwait_play_dead()
1612 return -ENOSYS; in native_cpu_disable()