From: "H. Peter Anvin" <h...@linux.intel.com>

Instead of using X86_32 || IA32_EMULATION, which is really rather ugly
in the Makefile especially, create a dedicated config symbol for the
TLS area.  This will be further used in subsequent patches.

Signed-off-by: H. Peter Anvin (Intel) <h...@zytor.com>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Andy Lutomirski <l...@kernel.org>
Cc: Chang S. Bae <chang.seok....@intel.com>
Cc: Markus T. Metzger <markus.t.metz...@intel.com>
---
 arch/x86/Kconfig         | 4 ++++
 arch/x86/kernel/Makefile | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f1dbb4ee19d7..e48036e3f158 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2937,6 +2937,10 @@ config X86_DMA_REMAP
 config HAVE_GENERIC_GUP
        def_bool y
 
+config X86_TLS_AREA
+       def_bool y
+       depends on IA32_EMULATION || X86_32
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 02d6f5cf4e70..d26ef8a40a88 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -65,8 +65,7 @@ obj-y                 += resource.o
 obj-y                          += process.o
 obj-y                          += fpu/
 obj-y                          += ptrace.o
-obj-$(CONFIG_X86_32)           += tls.o
-obj-$(CONFIG_IA32_EMULATION)   += tls.o
+obj-$(CONFIG_X86_TLS_AREA)     += tls.o
 obj-y                          += step.o
 obj-$(CONFIG_INTEL_TXT)                += tboot.o
 obj-$(CONFIG_ISA_DMA_API)      += i8237.o
-- 
2.14.4

Reply via email to