Lines Matching +full:can +full:- +full:secondary
1 // SPDX-License-Identifier: GPL-2.0-only
27 #include <linux/irqchip/arm-gic-v3.h>
60 * so we need some other way of telling a new secondary core
98 return -ENOSYS; in op_cpu_kill()
104 * Boot a secondary CPU, and assign it the specified idle task.
111 if (ops->cpu_boot) in boot_secondary()
112 return ops->cpu_boot(cpu); in boot_secondary()
114 return -EOPNOTSUPP; in boot_secondary()
125 * We need to tell the secondary core where to find its stack and the in __cpu_up()
134 if (ret != -EPERM) in __cpu_up()
170 pr_crit("CPU%u: does not support 52-bit VAs\n", cpu); in __cpu_up()
181 return -EIO; in __cpu_up()
200 * This is the secondary CPU boot entry. We're using this CPUs
215 current->active_mm = mm; in secondary_start_kernel()
237 if (ops->cpu_postboot) in secondary_start_kernel()
238 ops->cpu_postboot(); in secondary_start_kernel()
260 pr_info("CPU%u: Booted secondary processor 0x%010lx [0x%08x]\n", in secondary_start_kernel()
268 * Secondary CPUs enter the kernel with all DAIF exceptions masked. in secondary_start_kernel()
271 * as the root irqchip has already been detected and initialized we can in secondary_start_kernel()
291 if (!ops || !ops->cpu_die) in op_cpu_disable()
292 return -EOPNOTSUPP; in op_cpu_disable()
295 * We may need to abort a hot unplug for some other mechanism-specific in op_cpu_disable()
298 if (ops->cpu_disable) in op_cpu_disable()
299 return ops->cpu_disable(cpu); in op_cpu_disable()
320 * Take this CPU offline. Once we clear this, we can't return, in __cpu_disable()
327 * OK - migrate IRQs away from this CPU in __cpu_disable()
340 * that it is really dead. We can only wait for an arbitrary length of in op_cpu_kill()
343 if (!ops->cpu_kill) in op_cpu_kill()
346 return ops->cpu_kill(cpu); in op_cpu_kill()
361 * in-kernel synchronisation, try to get the firwmare to help us to in arch_cpuhp_cleanup_dead_cpu()
391 ops->cpu_die(cpu); in cpu_die()
402 if (ops && ops->cpu_die) in __cpu_try_die()
403 ops->cpu_die(cpu); in __cpu_try_die()
408 * Kill the calling secondary CPU, early in bringup before it is turned
458 * The runtime per-cpu areas have been allocated by in smp_prepare_boot_cpu()
459 * setup_per_cpu_areas(), and CPU0's boot time per-cpu area will be in smp_prepare_boot_cpu()
460 * freed shortly, so we must move over to the runtime per-cpu area. in smp_prepare_boot_cpu()
501 return -ENODEV; in smp_cpu_setup()
504 if (ops->cpu_init(cpu)) in smp_cpu_setup()
505 return -ENODEV; in smp_cpu_setup()
522 return -EPROBE_DEFER; in arch_register_cpu()
528 return -ENODEV; in arch_register_cpu()
536 c->hotpluggable = arch_cpu_is_hotpluggable(cpu); in arch_register_cpu()
578 * acpi_map_gic_cpu_interface - parse processor MADT entry
586 u64 hwid = processor->arm_mpidr; in acpi_map_gic_cpu_interface()
588 if (!(processor->flags & in acpi_map_gic_cpu_interface()
625 * Set-up the ACPI parking protocol cpu entries in acpi_map_gic_cpu_interface()
646 return -EINVAL; in acpi_parse_gic_cpu_interface()
648 acpi_table_print_madt_entry(&header->common); in acpi_parse_gic_cpu_interface()
708 * the logical map built from DT is validated and can in of_parse_and_init_cpus()
724 * the enable-method so continue without in of_parse_and_init_cpus()
757 pr_warn("Number of cores (%d) exceeds configured maximum of %u - clipping\n", in smp_init_cpus()
768 * and ACPI MADT entries) can be retrieved by matching the cpu hwid in smp_init_cpus()
770 * If the cpu set-up fails, invalidate the cpu_logical_map entry. in smp_init_cpus()
796 * secondary CPUs present. in smp_prepare_cpus()
815 err = ops->cpu_prepare(cpu); in smp_prepare_cpus()
844 seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i, in arch_show_interrupts()
883 * that cpu_online_mask gets correctly updated and smp_send_stop() can skip
896 * that pseudo-NMIs are disabled. The "crash stop" code starts with in ipi_cpu_crash_stop()
953 * Main handler for inter-processor interrupts
1016 do_handle_IPI(irq - ipi_irq_base); in ipi_handler()
1119 * dedicated IPI and we can safely handle spurious scheduler IPIs. in arch_send_wakeup_ipi()
1140 return num_online_cpus() - this_cpu_online; in num_other_online_cpus()
1167 * can be called in the panic path and thus it doesn't seem wise to in smp_send_stop()
1169 * - If a CPU comes online as we're running, we'll likely notice it in smp_send_stop()
1171 * with an NMI (assuming NMIs are enabled) since we re-snapshot the in smp_send_stop()
1173 * - If we leave the function and see that CPUs are still online we'll in smp_send_stop()
1176 * the fact that there could be cases where a CPU can't be stopped. in smp_send_stop()
1182 pr_crit("SMP: stopping secondary CPUs\n"); in smp_send_stop()
1192 while (num_other_online_cpus() && timeout--) in smp_send_stop()
1209 while (num_other_online_cpus() && timeout--) in smp_send_stop()
1218 pr_warn("SMP: failed to stop secondary CPUs %*pbl\n", in smp_send_stop()
1230 * This function can be called twice in panic path, but obviously in crash_smp_send_stop()
1257 if (ops && ops->cpu_die) in have_cpu_die()