staticint shmobile_scu_cpu_prepare(unsignedint cpu)
{ /* For this particular CPU register SCU SMP boot vector */
shmobile_smp_hook(cpu, __pa_symbol(shmobile_boot_scu),
shmobile_scu_base_phys); return 0;
}
void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys, unsignedint max_cpus)
{ /* install boot code shared by all CPUs */
shmobile_boot_fn = __pa_symbol(shmobile_smp_boot);
/* enable SCU and cache coherency on booting CPU */
shmobile_scu_base_phys = scu_base_phys;
shmobile_scu_base = ioremap(scu_base_phys, PAGE_SIZE);
scu_enable(shmobile_scu_base);
scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
/* Use CPU notifier for reset vector control */
cpuhp_setup_state_nocalls(CPUHP_ARM_SHMOBILE_SCU_PREPARE, "arm/shmobile-scu:prepare",
shmobile_scu_cpu_prepare, NULL);
}
#ifdef CONFIG_HOTPLUG_CPU void shmobile_smp_scu_cpu_die(unsignedint cpu)
{ /* For this particular CPU deregister boot vector */
shmobile_smp_hook(cpu, 0, 0);
if ((readl(shmobile_scu_base + 8) & mask) == mask) return 1;
return 0;
}
int shmobile_smp_scu_cpu_kill(unsignedint cpu)
{ int k;
/* this function is running on another CPU than the offline target, * here we need wait for shutdown code in platform_cpu_die() to * finish before asking SoC-specific code to power off the CPU core.
*/ for (k = 0; k < 1000; k++) { if (shmobile_smp_scu_psr_core_disabled(cpu)) return 1;
mdelay(1);
}
return 0;
} #endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(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.