/* Syscon register offsets for releasing cores from reset */ #define SC_CRIT_WRITE_KEY 0x1000 #define SC_RST_CPU_HOLD 0x1010
/* * Write the kernel entry point for secondary CPUs to the specified address
*/ staticvoid write_release_addr(u32 release_phys)
{
u32 *virt = (u32 *) phys_to_virt(release_phys);
writel_relaxed(__pa_symbol(secondary_startup), virt); /* Make sure this store is visible to other CPUs */
smp_wmb();
__cpuc_flush_dcache_area(virt, sizeof(u32));
}
staticvoid __init axxia_smp_prepare_cpus(unsignedint max_cpus)
{ int cpu_count = 0; int cpu;
/* * Initialise the present map, which describes the set of CPUs actually * populated at the present time.
*/
for_each_possible_cpu(cpu) { struct device_node *np;
u32 release_phys;
np = of_get_cpu_node(cpu, NULL); if (!np) continue; if (of_property_read_u32(np, "cpu-release-addr", &release_phys)) continue;
if (cpu_count < max_cpus) {
set_cpu_present(cpu, true);
cpu_count++;
}
if (release_phys != 0)
write_release_addr(release_phys);
}
}
¤ 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.0.11Bemerkung:
(vorverarbeitet)
¤
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.