// SPDX-License-Identifier: GPL-2.0-only /* * Symmetric Multi Processing (SMP) support for Armada XP * * Copyright (C) 2012 Marvell * * Lior Amsalem <alior@marvell.com> * Yehuda Yitschak <yehuday@marvell.com> * Gregory CLEMENT <gregory.clement@free-electrons.com> * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> * * The Armada XP SoC has 4 ARMv7 PJ4B CPUs running in full HW coherency * This file implements the routines for preparing the SMP infrastructure * and waking up the secondary CPUs
*/
/* * This is needed to wake up CPUs in the offline state after * using CPU hotplug.
*/
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
/* * This is needed to take secondary CPUs out of reset on the * initial boot.
*/
ret = mvebu_cpu_reset_deassert(hw_cpu); if (ret) {
pr_warn("unable to boot 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_xp_cpu_die() * below.
*/ staticvoid armada_xp_secondary_init(unsignedint cpu)
{
mvebu_v7_pmsu_idle_exit();
}
/* * In order to boot the secondary CPUs we need to ensure * the bootROM is mapped at the correct address.
*/
node = of_find_compatible_node(NULL, NULL, "marvell,bootrom"); if (!node)
panic("Cannot find 'marvell,bootrom' compatible node");
err = of_address_to_resource(node, 0, &res);
of_node_put(node); if (err < 0)
panic("Cannot get 'bootrom' node address");
if (res.start != AXP_BOOTROM_BASE ||
resource_size(&res) != AXP_BOOTROM_SIZE)
panic("The address for the BootROM is incorrect");
}
#ifdef CONFIG_HOTPLUG_CPU staticvoid armada_xp_cpu_die(unsignedint cpu)
{ /* * CPU hotplug is implemented by putting offline CPUs into the * deep idle sleep state.
*/
armada_370_xp_pmsu_idle_enter(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_xp_cpu_kill(unsignedint cpu)
{ return 1;
} #endif
/* * This is needed to wake up CPUs in the offline state after * using CPU hotplug.
*/
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
/* * This is needed to take secondary CPUs out of reset on the * initial boot.
*/
ret = mvebu_cpu_reset_deassert(hw_cpu); if (ret) {
pr_warn("unable to boot CPU: %d\n", ret); return ret;
}
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.