arm: Replace CONFIG_HAS_TLS_REG with HWCAP_TLS and check for it on V6
authorTony Lindgren <tony@atomide.com>
Wed, 7 Jul 2010 12:37:26 +0000 (15:37 +0300)
committerTony Lindgren <tony@atomide.com>
Wed, 7 Jul 2010 12:37:26 +0000 (15:37 +0300)
commit85433f3a72165da1c926cdd15c16abb18753e10d
treea16b614b0300f712def2ed69f84ee74111af0ad2
parentaf0af4ea36782f8bf8c87c1923e436942d6f5f60
arm: Replace CONFIG_HAS_TLS_REG with HWCAP_TLS and check for it on V6

The TLS register is only available on ARM1136 r1p0 and later.
Set HWCAP_TLS flags if hardware TLS is available and test for
it if CONFIG_CPU_32v6K is not set for V6.

Note that we set the TLS instruction in __kuser_get_tls
dynamically as suggested by Jamie Lokier <jamie@shareable.org>.

Also the __switch_to code is optimized out in most cases as
suggested by Nicolas Pitre <nico@fluxnic.net>.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org>
arch/arm/include/asm/hwcap.h
arch/arm/include/asm/tls.h [new file with mode: 0644]
arch/arm/kernel/entry-armv.S
arch/arm/kernel/setup.c
arch/arm/kernel/traps.c
arch/arm/mm/Kconfig
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S