diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0efb4c9..fb8c91f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1787,6 +1787,26 @@ config X86_INTEL_MEMORY_PROTECTION_KEYS
 
 	  If unsure, say y.
 
+config INTEL_SGX
+	tristate "Intel(R) SGX Driver"
+	default n
+	depends on X86
+	select MMU_NOTIFIER
+	---help---
+	  Intel(R) SGX is a set of CPU instructions that can be used by
+	  applications to set aside private regions of code and data.  The
+	  code outside the enclave is disallowed to access the memory inside
+	  the enclave by the CPU access control.
+
+	  The firmware uses PRMRR registers to reserve an area of physical
+	  memory called Enclave Page Cache (EPC). There is a hardware unit in
+	  the processor called Memory Encryption Engine. The MEE encrypts and
+	  decrypts the EPC pages as they enter and leave the processor package.
+
+	  For details, see Documentation/x86/intel_sgx.rst
+
+	  If unsure, say N.
+
 config EFI
 	bool "EFI runtime service support"
 	depends on ACPI
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 5200001..490fd60 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 obj-$(CONFIG_INTEL_RDT_A)	+= intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_schemata.o
 
+obj-$(CONFIG_INTEL_SGX)			+= intel_sgx/
 obj-$(CONFIG_X86_MCE)			+= mcheck/
 obj-$(CONFIG_MTRR)			+= mtrr/
 obj-$(CONFIG_MICROCODE)			+= microcode/
diff --git a/drivers/platform/x86/intel_sgx/Makefile b/arch/x86/kernel/cpu/intel_sgx/Makefile
similarity index 100%
rename from drivers/platform/x86/intel_sgx/Makefile
rename to arch/x86/kernel/cpu/intel_sgx/Makefile
diff --git a/drivers/platform/x86/intel_sgx/sgx.h b/arch/x86/kernel/cpu/intel_sgx/sgx.h
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx.h
rename to arch/x86/kernel/cpu/intel_sgx/sgx.h
diff --git a/drivers/platform/x86/intel_sgx/sgx_ioctl.c b/arch/x86/kernel/cpu/intel_sgx/sgx_ioctl.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_ioctl.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_ioctl.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_main.c b/arch/x86/kernel/cpu/intel_sgx/sgx_main.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_main.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_main.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_page_cache.c b/arch/x86/kernel/cpu/intel_sgx/sgx_page_cache.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_page_cache.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_page_cache.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_util.c b/arch/x86/kernel/cpu/intel_sgx/sgx_util.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_util.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_util.c
diff --git a/drivers/platform/x86/intel_sgx/sgx_vma.c b/arch/x86/kernel/cpu/intel_sgx/sgx_vma.c
similarity index 100%
rename from drivers/platform/x86/intel_sgx/sgx_vma.c
rename to arch/x86/kernel/cpu/intel_sgx/sgx_vma.c
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 6c217ac..8489020 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1110,8 +1110,6 @@ config SILEAD_DMI
 	  with the OS-image for the device. This option supplies the missing
 	  information. Enable this for x86 tablets with Silead touchscreens.
 
-source "drivers/platform/x86/intel_sgx/Kconfig"
-
 endif # X86_PLATFORM_DEVICES
 
 config PMC_ATOM
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index aec6e53..182a3ed 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -80,4 +80,3 @@ obj-$(CONFIG_PMC_ATOM)		+= pmc_atom.o
 obj-$(CONFIG_MLX_PLATFORM)	+= mlx-platform.o
 obj-$(CONFIG_MLX_CPLD_PLATFORM)	+= mlxcpld-hotplug.o
 obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
-obj-$(CONFIG_INTEL_SGX) += intel_sgx/
diff --git a/drivers/platform/x86/intel_sgx/Kconfig b/drivers/platform/x86/intel_sgx/Kconfig
deleted file mode 100644
index 9641728..0000000
--- a/drivers/platform/x86/intel_sgx/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Intel SGX
-#
-
-config INTEL_SGX
-	tristate "Intel(R) SGX Driver"
-	default n
-	depends on X86
-	select MMU_NOTIFIER
-	---help---
-	Intel(R) SGX is a set of CPU instructions that can be used by
-	applications to set aside private regions of code and data.  The code
-	outside the enclave is disallowed to access the memory inside the
-	enclave by the CPU access control.
-
-	The firmware uses PRMRR registers to reserve an area of physical memory
-	called Enclave Page Cache (EPC). There is a hardware unit in the
-	processor called Memory Encryption Engine. The MEE encrypts and decrypts
-	the EPC pages as they enter and leave the processor package.
