Lines Matching +full:secondary +full:- +full:boot +full:- +full:reg

1 // SPDX-License-Identifier: GPL-2.0-only
27 #include <linux/irqchip/arm-gic-v3.h>
62 * so we need some other way of telling a new secondary core
92 return -ENOSYS; in op_cpu_kill()
98 * Boot a secondary CPU, and assign it the specified idle task.
105 if (ops->cpu_boot) in boot_secondary()
106 return ops->cpu_boot(cpu); in boot_secondary()
108 return -EOPNOTSUPP; in boot_secondary()
119 * We need to tell the secondary core where to find its stack and the in __cpu_up()
130 pr_err("CPU%u: failed to boot: %d\n", cpu, ret); in __cpu_up()
159 pr_crit("CPU%u: died during early boot\n", cpu); in __cpu_up()
167 pr_crit("CPU%u: does not support 52-bit VAs\n", cpu); in __cpu_up()
178 return -EIO; in __cpu_up()
196 * This is the secondary CPU boot entry. We're using this CPUs
214 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()
256 * OK, now it's safe to let the boot CPU continue. Wait for in secondary_start_kernel()
260 pr_info("CPU%u: Booted secondary processor 0x%010lx [0x%08x]\n", in secondary_start_kernel()
284 if (!ops || !ops->cpu_die) in op_cpu_disable()
285 return -EOPNOTSUPP; in op_cpu_disable()
288 * We may need to abort a hot unplug for some other mechanism-specific in op_cpu_disable()
291 if (ops->cpu_disable) in op_cpu_disable()
292 return ops->cpu_disable(cpu); in op_cpu_disable()
320 * OK - migrate IRQs away from this CPU in __cpu_disable()
336 if (!ops->cpu_kill) in op_cpu_kill()
339 return ops->cpu_kill(cpu); in op_cpu_kill()
343 * called on the thread which is asking for a CPU to be shutdown -
358 * in-kernel synchronisation, try to get the firwmare to help us to in __cpu_die()
388 ops->cpu_die(cpu); in cpu_die()
399 if (ops && ops->cpu_die) in __cpu_try_die()
400 ops->cpu_die(cpu); in __cpu_try_die()
405 * Kill the calling secondary CPU, early in bringup before it is turned
412 pr_crit("CPU%d: will not boot\n", cpu); in cpu_die_early()
456 * We now know enough about the boot CPU to apply the in smp_prepare_boot_cpu()
473 * A cpu node with missing "reg" property is in of_get_cpu_mpidr()
477 cell = of_get_property(dn, "reg", NULL); in of_get_cpu_mpidr()
479 pr_err("%pOF: missing reg property\n", dn); in of_get_cpu_mpidr()
488 pr_err("%pOF: invalid reg property\n", dn); in of_get_cpu_mpidr()
519 return -ENODEV; in smp_cpu_setup()
522 if (ops->cpu_init(cpu)) in smp_cpu_setup()
523 return -ENODEV; in smp_cpu_setup()
542 * acpi_map_gic_cpu_interface - parse processor MADT entry
550 u64 hwid = processor->arm_mpidr; in acpi_map_gic_cpu_interface()
552 if (!(processor->flags & ACPI_MADT_ENABLED)) { in acpi_map_gic_cpu_interface()
567 /* Check if GICC structure of boot CPU is available in the MADT */ in acpi_map_gic_cpu_interface()
570 pr_err("duplicate boot CPU MPIDR: 0x%llx in MADT\n", in acpi_map_gic_cpu_interface()
588 * Set-up the ACPI parking protocol cpu entries in acpi_map_gic_cpu_interface()
609 return -EINVAL; in acpi_parse_gic_cpu_interface()
611 acpi_table_print_madt_entry(&header->common); in acpi_parse_gic_cpu_interface()
663 pr_err("%pOF: duplicate cpu reg properties in the DT\n", in of_parse_and_init_cpus()
669 * The numbering scheme requires that the boot CPU in of_parse_and_init_cpus()
676 pr_err("%pOF: duplicate boot cpu reg property in DT\n", in of_parse_and_init_cpus()
686 * initialized and the boot cpu doesn't need in of_parse_and_init_cpus()
687 * the enable-method so continue without in of_parse_and_init_cpus()
720 pr_warn("Number of cores (%d) exceeds configured maximum of %u - clipping\n", in smp_init_cpus()
724 pr_err("missing boot CPU MPIDR, not enabling secondaries\n"); in smp_init_cpus()
733 * If the cpu set-up fails, invalidate the cpu_logical_map entry. in smp_init_cpus()
759 * secondary CPUs present. in smp_prepare_cpus()
780 err = ops->cpu_prepare(cpu); in smp_prepare_cpus()
797 S(IPI_WAKEUP, "CPU wake-up interrupts"),
810 seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i, in arch_show_interrupts()
887 * Main handler for inter-processor interrupts
932 "CPU%u: Wake-up IPI outside the ACPI parking protocol\n", in do_handle_IPI()
948 do_handle_IPI(irq - ipi_irq_base); in ipi_handler()
1002 /* Setup the boot CPU immediately */ in set_smp_ipi_range()
1026 return num_online_cpus() - this_cpu_online; in num_other_online_cpus()
1040 pr_crit("SMP: stopping secondary CPUs\n"); in smp_send_stop()
1046 while (num_other_online_cpus() && timeout--) in smp_send_stop()
1050 pr_warn("SMP: failed to stop secondary CPUs %*pbl\n", in smp_send_stop()
1086 pr_crit("SMP: stopping secondary CPUs\n"); in crash_smp_send_stop()
1091 while ((atomic_read(&waiting_for_crash_ipi) > 0) && timeout--) in crash_smp_send_stop()
1095 pr_warn("SMP: failed to stop secondary CPUs %*pbl\n", in crash_smp_send_stop()
1112 return -EINVAL; in setup_profiling_timer()
1121 if (ops && ops->cpu_die) in have_cpu_die()