ARM: smp: elide HWCAP_TLS checks or __entry_task updates on SMP+v6
authorArd Biesheuvel <ardb@kernel.org>
Mon, 24 Jan 2022 18:28:58 +0000 (19:28 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 25 Jan 2022 08:53:52 +0000 (09:53 +0100)
commit75fa4adc4f50ee52d8cdfa3e84798176ccb4a354
tree138883d819bf540c067dd986ef505460e49376e9
parentd6905849f87596f94c2778c8337697df486de43c
ARM: smp: elide HWCAP_TLS checks or __entry_task updates on SMP+v6

Use the SMP_ON_UP patching framework to elide HWCAP_TLS tests from the
context switch and return to userspace code paths, as SMP systems are
guaranteed to have this h/w capability.

At the same time, omit the update of __entry_task if the system is
detected to be UP at runtime, as in that case, the value is never used.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/arm/include/asm/switch_to.h
arch/arm/include/asm/tls.h
arch/arm/kernel/entry-header.S