staticint mvebu_cortex_a9_boot_secondary(unsignedint cpu, struct task_struct *idle)
{ int ret, hw_cpu;
pr_info("Booting CPU %d\n", cpu);
/* * Write the address of secondary startup into the system-wide * flags register. The boot monitor waits until it receives a * soft interrupt, and then the secondary CPU branches to this * address.
*/
hw_cpu = cpu_logical_map(cpu); if (of_machine_is_compatible("marvell,armada375"))
mvebu_system_controller_set_cpu_boot_addr(mvebu_cortex_a9_secondary_startup); else
mvebu_pmsu_set_cpu_boot_addr(hw_cpu, mvebu_cortex_a9_secondary_startup);
smp_wmb();
/* * Doing this before deasserting the CPUs is needed to wake up CPUs * in the offline state after using CPU hotplug.
*/
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
ret = mvebu_cpu_reset_deassert(hw_cpu); if (ret) {
pr_err("Could not start the secondary CPU: %d\n", ret); return ret;
}
return 0;
} /* * When a CPU is brought back online, either through CPU hotplug, or * because of the boot of a kexec'ed kernel, the PMSU configuration * for this CPU might be in the deep idle state, preventing this CPU * from receiving interrupts. Here, we therefore take out the current * CPU from this state, which was entered by armada_38x_cpu_die() * below.
*/ staticvoid armada_38x_secondary_init(unsignedint cpu)
{
mvebu_v7_pmsu_idle_exit();
}
#ifdef CONFIG_HOTPLUG_CPU staticvoid armada_38x_cpu_die(unsignedint cpu)
{ /* * CPU hotplug is implemented by putting offline CPUs into the * deep idle sleep state.
*/
armada_38x_do_cpu_suspend(true);
}
/* * We need a dummy function, so that platform_can_cpu_hotplug() knows * we support CPU hotplug. However, the function does not need to do * anything, because CPUs going offline can enter the deep idle state * by themselves, without any help from a still alive CPU.
*/ staticint armada_38x_cpu_kill(unsignedint cpu)
{ return 1;
} #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.