Lines Matching refs:cpu

83 static void ipi_setup(int cpu);
86 static void ipi_teardown(int cpu);
87 static int op_cpu_kill(unsigned int cpu);
89 static inline int op_cpu_kill(unsigned int cpu) in op_cpu_kill() argument
100 static int boot_secondary(unsigned int cpu, struct task_struct *idle) in boot_secondary() argument
102 const struct cpu_operations *ops = get_cpu_ops(cpu); in boot_secondary()
105 return ops->cpu_boot(cpu); in boot_secondary()
112 int __cpu_up(unsigned int cpu, struct task_struct *idle) in __cpu_up() argument
125 ret = boot_secondary(cpu, idle); in __cpu_up()
127 pr_err("CPU%u: failed to boot: %d\n", cpu, ret); in __cpu_up()
137 if (cpu_online(cpu)) in __cpu_up()
140 pr_crit("CPU%u: failed to come online\n", cpu); in __cpu_up()
149 cpu, status); in __cpu_up()
153 if (!op_cpu_kill(cpu)) { in __cpu_up()
154 pr_crit("CPU%u: died during early boot\n", cpu); in __cpu_up()
157 pr_crit("CPU%u: may not have shut down cleanly\n", cpu); in __cpu_up()
160 pr_crit("CPU%u: is stuck in kernel\n", cpu); in __cpu_up()
162 pr_crit("CPU%u: does not support 52-bit VAs\n", cpu); in __cpu_up()
165 cpu, PAGE_SIZE / SZ_1K); in __cpu_up()
170 panic("CPU%u detected unsupported configuration\n", cpu); in __cpu_up()
200 unsigned int cpu = smp_processor_id(); in secondary_start_kernel() local
218 rcu_cpu_starting(cpu); in secondary_start_kernel()
228 ops = get_cpu_ops(cpu); in secondary_start_kernel()
236 store_cpu_topology(cpu); in secondary_start_kernel()
241 notify_cpu_starting(cpu); in secondary_start_kernel()
243 ipi_setup(cpu); in secondary_start_kernel()
245 numa_add_cpu(cpu); in secondary_start_kernel()
253 cpu, (unsigned long)mpidr, in secondary_start_kernel()
256 set_cpu_online(cpu, true); in secondary_start_kernel()
268 static int op_cpu_disable(unsigned int cpu) in op_cpu_disable() argument
270 const struct cpu_operations *ops = get_cpu_ops(cpu); in op_cpu_disable()
284 return ops->cpu_disable(cpu); in op_cpu_disable()
294 unsigned int cpu = smp_processor_id(); in __cpu_disable() local
297 ret = op_cpu_disable(cpu); in __cpu_disable()
301 remove_cpu_topology(cpu); in __cpu_disable()
302 numa_remove_cpu(cpu); in __cpu_disable()
308 set_cpu_online(cpu, false); in __cpu_disable()
309 ipi_teardown(cpu); in __cpu_disable()
319 static int op_cpu_kill(unsigned int cpu) in op_cpu_kill() argument
321 const struct cpu_operations *ops = get_cpu_ops(cpu); in op_cpu_kill()
331 return ops->cpu_kill(cpu); in op_cpu_kill()
338 void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu) in arch_cpuhp_cleanup_dead_cpu() argument
342 pr_debug("CPU%u: shutdown\n", cpu); in arch_cpuhp_cleanup_dead_cpu()
350 err = op_cpu_kill(cpu); in arch_cpuhp_cleanup_dead_cpu()
352 pr_warn("CPU%d may not have shut down cleanly: %d\n", cpu, err); in arch_cpuhp_cleanup_dead_cpu()
361 unsigned int cpu = smp_processor_id(); in cpu_die() local
362 const struct cpu_operations *ops = get_cpu_ops(cpu); in cpu_die()
376 ops->cpu_die(cpu); in cpu_die()
382 static void __cpu_try_die(int cpu) in __cpu_try_die() argument
385 const struct cpu_operations *ops = get_cpu_ops(cpu); in __cpu_try_die()
388 ops->cpu_die(cpu); in __cpu_try_die()
398 int cpu = smp_processor_id(); in cpu_die_early() local
400 pr_crit("CPU%d: will not boot\n", cpu); in cpu_die_early()
403 set_cpu_present(cpu, 0); in cpu_die_early()
404 rcu_report_dead(cpu); in cpu_die_early()
408 __cpu_try_die(cpu); in cpu_die_early()
470 static bool __init is_mpidr_duplicate(unsigned int cpu, u64 hwid) in is_mpidr_duplicate() argument
474 for (i = 1; (i < cpu) && (i < NR_CPUS); i++) in is_mpidr_duplicate()
484 static int __init smp_cpu_setup(int cpu) in smp_cpu_setup() argument
488 if (init_cpu_ops(cpu)) in smp_cpu_setup()
491 ops = get_cpu_ops(cpu); in smp_cpu_setup()
492 if (ops->cpu_init(cpu)) in smp_cpu_setup()
495 set_cpu_possible(cpu, true); in smp_cpu_setup()
506 struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu) in acpi_cpu_get_madt_gicc() argument
508 return &cpu_madt_gicc[cpu]; in acpi_cpu_get_madt_gicc()
718 unsigned int cpu; in smp_prepare_cpus() local
740 for_each_possible_cpu(cpu) { in smp_prepare_cpus()
742 per_cpu(cpu_number, cpu) = cpu; in smp_prepare_cpus()
744 if (cpu == smp_processor_id()) in smp_prepare_cpus()
747 ops = get_cpu_ops(cpu); in smp_prepare_cpus()
751 err = ops->cpu_prepare(cpu); in smp_prepare_cpus()
755 set_cpu_present(cpu, true); in smp_prepare_cpus()
756 numa_store_cpu_info(cpu); in smp_prepare_cpus()
776 unsigned int cpu, i; in arch_show_interrupts() local
781 for_each_online_cpu(cpu) in arch_show_interrupts()
782 seq_printf(p, "%10u ", irq_desc_kstat_cpu(ipi_desc[i], cpu)); in arch_show_interrupts()
795 void arch_send_call_function_single_ipi(int cpu) in arch_send_call_function_single_ipi() argument
797 smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC); in arch_send_call_function_single_ipi()
837 static void __noreturn ipi_cpu_crash_stop(unsigned int cpu, struct pt_regs *regs) in ipi_cpu_crash_stop() argument
840 crash_save_cpu(regs, cpu); in ipi_cpu_crash_stop()
848 __cpu_try_die(cpu); in ipi_cpu_crash_stop()
862 unsigned int cpu = smp_processor_id(); in do_handle_IPI() local
882 ipi_cpu_crash_stop(cpu, get_irq_regs()); in do_handle_IPI()
902 WARN_ONCE(!acpi_parking_protocol_valid(cpu), in do_handle_IPI()
904 cpu); in do_handle_IPI()
909 pr_crit("CPU%u: Unknown IPI message 0x%x\n", cpu, ipinr); in do_handle_IPI()
929 static void ipi_setup(int cpu) in ipi_setup() argument
941 static void ipi_teardown(int cpu) in ipi_teardown() argument
977 void arch_smp_send_reschedule(int cpu) in arch_smp_send_reschedule() argument
979 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); in arch_smp_send_reschedule()