x86, um: merge Kconfig.i386 and Kconfig.x86_64
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 23 Aug 2008 21:00:34 +0000 (17:00 -0400)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 23 Oct 2008 05:55:22 +0000 (22:55 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/um/Kconfig
arch/um/Kconfig.i386 [deleted file]
arch/um/Kconfig.x86 [new file with mode: 0644]
arch/um/Kconfig.x86_64 [deleted file]
arch/um/Makefile

index 393bccfe1785108579dc6c18bab682f2e7984110..a0801fda0be49b705355fb83cd8f76a3e08e02ab 100644 (file)
@@ -85,6 +85,10 @@ config STATIC_LINK
          Additionally, this option enables using higher memory spaces (up to
          2.75G) for UML.
 
+config SUBARCH
+       string
+       option env="SUBARCH"
+
 source "arch/um/Kconfig.arch"
 source "mm/Kconfig"
 source "kernel/time/Kconfig"
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
deleted file mode 100644 (file)
index 1f57c11..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-menu "Host processor type and features"
-
-source "arch/x86/Kconfig.cpu"
-
-endmenu
-
-config UML_X86
-       bool
-       default y
-
-config X86_32
-       bool
-       default y
-       select HAVE_AOUT
-
-config RWSEM_XCHGADD_ALGORITHM
-       def_bool y
-
-config 64BIT
-       bool
-       default n
-
-config 3_LEVEL_PGTABLES
-       bool "Three-level pagetables (EXPERIMENTAL)"
-       default n
-       depends on EXPERIMENTAL
-       help
-       Three-level pagetables will let UML have more than 4G of physical
-       memory.  All the memory that can't be mapped directly will be treated
-       as high memory.
-
-       However, this it experimental on 32-bit architectures, so if unsure say
-       N (on x86-64 it's automatically enabled, instead, as it's safe there).
-
-config ARCH_HAS_SC_SIGNALS
-       bool
-       default y
-
-config ARCH_REUSE_HOST_VSYSCALL_AREA
-       bool
-       default y
-
-config GENERIC_HWEIGHT
-       bool
-       default y
diff --git a/arch/um/Kconfig.x86 b/arch/um/Kconfig.x86
new file mode 100644 (file)
index 0000000..76200c9
--- /dev/null
@@ -0,0 +1,46 @@
+menu "Host processor type and features"
+
+source "arch/x86/Kconfig.cpu"
+
+endmenu
+
+config UML_X86
+       def_bool y
+
+config 64BIT
+       bool
+       default SUBARCH = "x86_64"
+
+config X86_32
+       def_bool !64BIT
+       select HAVE_AOUT
+
+config RWSEM_XCHGADD_ALGORITHM
+       def_bool X86_XADD
+
+config RWSEM_GENERIC_SPINLOCK
+       def_bool !X86_XADD
+
+config 3_LEVEL_PGTABLES
+       bool "Three-level pagetables (EXPERIMENTAL)" if !64BIT
+       default 64BIT
+       depends on EXPERIMENTAL
+       help
+       Three-level pagetables will let UML have more than 4G of physical
+       memory.  All the memory that can't be mapped directly will be treated
+       as high memory.
+
+       However, this it experimental on 32-bit architectures, so if unsure say
+       N (on x86-64 it's automatically enabled, instead, as it's safe there).
+
+config ARCH_HAS_SC_SIGNALS
+       def_bool !64BIT
+
+config ARCH_REUSE_HOST_VSYSCALL_AREA
+       def_bool !64BIT
+
+config SMP_BROKEN
+       def_bool 64BIT
+
+config GENERIC_HWEIGHT
+       def_bool y
diff --git a/arch/um/Kconfig.x86_64 b/arch/um/Kconfig.x86_64
deleted file mode 100644 (file)
index 40b3407..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-menu "Host processor type and features"
-
-source "arch/x86/Kconfig.cpu"
-
-endmenu
-
-config UML_X86
-       bool
-       default y
-
-config 64BIT
-       bool
-       default y
-
-#XXX: this is so in the underlying arch, but it's wrong!!!
-config RWSEM_GENERIC_SPINLOCK
-       bool
-       default y
-
-config 3_LEVEL_PGTABLES
-       bool
-       default y
-
-config ARCH_HAS_SC_SIGNALS
-       bool
-       default n
-
-config ARCH_REUSE_HOST_VSYSCALL_AREA
-       bool
-       default n
-
-config SMP_BROKEN
-       bool
-       default y
-
-config GENERIC_HWEIGHT
-       bool
-       default y
index 2e042b0e3b8a5b8fc7ef89c353675f076f691d48..bc070cef3ceb27222a5134c2f6ef4dac66f4570a 100644 (file)
@@ -96,9 +96,9 @@ define archhelp
 endef
 
 ifneq ($(KBUILD_SRC),)
-$(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch)
+$(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig.$(HEADER_ARCH) $(ARCH_DIR)/Kconfig.arch)
 else
-$(shell ln -fsn Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch)
+$(shell ln -fsn Kconfig.$(HEADER_ARCH) $(ARCH_DIR)/Kconfig.arch)
 endif
 
 archprepare: $(ARCH_SYMLINKS) $(ARCH_DIR)/include/shared/user_constants.h