ARM: smp: defer TPIDRURO update for SMP v6 configurations too
authorArd Biesheuvel <ardb@kernel.org>
Thu, 25 Nov 2021 22:21:45 +0000 (23:21 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 6 Dec 2021 11:49:17 +0000 (12:49 +0100)
commitc2755910373bb5dfb9aa68ba2924036686815c9e
treeb54e4da6d120da7e911016e4e8d1560ca6dd2d22
parentb87cf9118e03d8a83039c88fa348165148f5d487
ARM: smp: defer TPIDRURO update for SMP v6 configurations too

Defer TPIDURO updates for user space until exit also for CPU_V6+SMP
configurations so that we can decide at runtime whether to use it to
carry the current pointer, provided that we are running on a CPU that
actually implements this register. This is needed for
THREAD_INFO_IN_TASK support for UP systems, which requires that all SMP
capable systems use the TPIDRURO based access to 'current' as the only
remaining alternative will be a global variable which only works on UP.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
arch/arm/include/asm/tls.h
arch/arm/kernel/entry-header.S