/* * The hartid must be less than NR_CPUS to avoid out-of-bound access * errors for __cpu_spinwait_stack/task_pointer. That is not always possible * for platforms with discontiguous hartid numbering scheme. That's why * spinwait booting is not the recommended approach for any platforms * booting Linux in S-mode and can be disabled in the future.
*/ if (hartid == INVALID_HARTID || hartid >= (unsignedlong) NR_CPUS) return;
/* Make sure tidle is updated */
smp_mb();
WRITE_ONCE(__cpu_spinwait_stack_pointer[hartid], task_pt_regs(tidle));
WRITE_ONCE(__cpu_spinwait_task_pointer[hartid], tidle);
}
staticint spinwait_cpu_start(unsignedint cpuid, struct task_struct *tidle)
{ /* * In this protocol, all cpus boot on their own accord. _start * selects the first cpu to boot the kernel and causes the remainder * of the cpus to spin in a loop waiting for their stack pointer to be * setup by that main cpu. Writing to bootdata * (i.e __cpu_spinwait_stack_pointer) signals to the spinning cpus that they * can continue the boot process.
*/
cpu_update_secondary_bootdata(cpuid, tidle);
¤ 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.1Bemerkung:
(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.