.macro switch_tls_v6k, base, tp, tpuser, tmp1, tmp2
mrc p15, 0, \tmp2, c13, c0, 2 @ get the user r/w register
@ TLS register update is deferred until return to user space
mcr p15, 0, \tpuser, c13, c0, 2 @ set the user r/w register
str \tmp2, [\base, #TI_TP_VALUE + 4] @ save it
.endm
/* * This code runs with preemption enabled and therefore must * be reentrant with respect to switch_tls. * * We need to ensure ordering between the shadow state and the * hardware state, so that we don't corrupt the hardware state * with a stale shadow state during context switch. * * If we're preempted here, switch_tls will load TPIDRURO from * thread_info upon resuming execution and the following mcr * is merely redundant.
*/
barrier();
if (!tls_emu) { if (has_tls_reg && !defer_tls_reg_update) { asm("mcr p15, 0, %0, c13, c0, 3"
: : "r" (val));
} elseif (!has_tls_reg) { #ifdef CONFIG_KUSER_HELPERS /* * User space must never try to access this * directly. Expect your app to break * eventually if you do so. The user helper * at 0xffff0fe0 must be used instead. (see * entry-armv.S for details)
*/
*((unsignedint *)0xffff0ff0) = val; #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.