Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: v6k: select TLS register code according to V6 variants

If CONFIG_CPU_V6 is enabled, we may or may not have the TLS register.
Use the conditional code which copes with this variability. Otherwise,
if CONFIG_CPU_32v6K is set, we know we have the TLS register on all
supported CPUs, so use it unconditionally.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+5 -6
+5 -6
arch/arm/include/asm/tls.h
··· 28 28 #define tls_emu 1 29 29 #define has_tls_reg 1 30 30 #define set_tls set_tls_none 31 - #elif __LINUX_ARM_ARCH__ >= 7 || \ 32 - (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) 33 - #define tls_emu 0 34 - #define has_tls_reg 1 35 - #define set_tls set_tls_v6k 36 - #elif __LINUX_ARM_ARCH__ == 6 31 + #elif defined(CONFIG_CPU_V6) 37 32 #define tls_emu 0 38 33 #define has_tls_reg (elf_hwcap & HWCAP_TLS) 39 34 #define set_tls set_tls_v6 35 + #elif defined(CONFIG_CPU_32v6K) 36 + #define tls_emu 0 37 + #define has_tls_reg 1 38 + #define set_tls set_tls_v6k 40 39 #else 41 40 #define tls_emu 0 42 41 #define has_tls_reg 0