[PATCH v3 4/7] x86/tls: create an explicit config symbol for the TLS area in the GDT
From: H. Peter Anvin, Intel
Date: Thu Jun 21 2018 - 17:18:21 EST
From: "H. Peter Anvin" <hpa@xxxxxxxxxxxxxxx>
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) <hpa@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
Cc: Markus T. Metzger <markus.t.metzger@xxxxxxxxx>
---
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