All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 09/10] x86: select i386 or x86_64 at config time
Date: Sun,  4 Nov 2007 00:51:19 +0100	[thread overview]
Message-ID: <1194133881756-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <1194133881972-git-send-email-sam@ravnborg.org>

Like powerpc and other we now select the actual
architecture during configuration.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/Kconfig         |   26 +++++++++++++++++++++++++-
 arch/x86/Kconfig.i386    |   17 +++--------------
 arch/x86/Kconfig.x86_64  |   16 +++-------------
 scripts/kconfig/Makefile |    7 +------
 4 files changed, 32 insertions(+), 34 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c325606..d51f3c8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1,4 +1,28 @@
+mainmenu "Linux Kernel Configuration"
 
+choice
+	prompt "Architecture?"
+	default X86_32
+
+config X86_32
+	bool "i386"
+	help
+	  This is Linux's home port.  Linux was originally native to the Intel
+	  386, and runs on all the later x86 processors including the Intel
+	  486, 586, Pentiums, and various instruction-set-compatible chips by
+	  AMD, Cyrix, and others.
+
+config X86_64
+	bool "x86_64"
+	help
+	  Port to the x86-64 architecture. x86-64 is a 64-bit extension to the
+	  classical 32-bit x86 architecture. For details see
+	  <http://www.x86-64.org/>.
+
+endchoice
+
+source "arch/x86/Kconfig.i386"
+source "arch/x86/Kconfig.x86_64"
 source "init/Kconfig"
 
 menu "Processor type and features"
@@ -792,8 +816,8 @@ config CRASH_DUMP
 
 config PHYSICAL_START
 	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
-	default "0x1000000" if X86_NUMAQ
 	default "0x200000"  if X86_64
+	default "0x1000000" if X86_NUMAQ
 	default "0x100000"
 	help
 	  This gives the physical address where the kernel is loaded.
diff --git a/arch/x86/Kconfig.i386 b/arch/x86/Kconfig.i386
index 9fe6c36..c8cc0f2 100644
--- a/arch/x86/Kconfig.i386
+++ b/arch/x86/Kconfig.i386
@@ -1,18 +1,7 @@
+# i386 specific settings
 #
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/kconfig-language.txt.
-#
-
-mainmenu "Linux Kernel Configuration"
 
-config X86_32
-	bool
-	default y
-	help
-	  This is Linux's home port.  Linux was originally native to the Intel
-	  386, and runs on all the later x86 processors including the Intel
-	  486, 586, Pentiums, and various instruction-set-compatible chips by
-	  AMD, Cyrix, and others.
+if X86_32
 
 config GENERIC_TIME
 	bool
@@ -296,4 +285,4 @@ config KTIME_SCALAR
 	bool
 	default y
 
-source "arch/x86/Kconfig"
+endif  # X86_32
diff --git a/arch/x86/Kconfig.x86_64 b/arch/x86/Kconfig.x86_64
index 8721902..6eb8a09 100644
--- a/arch/x86/Kconfig.x86_64
+++ b/arch/x86/Kconfig.x86_64
@@ -1,21 +1,11 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/kconfig-language.txt.
+# X86_64 specific settings
 #
 # Note: ISA is disabled and will hopefully never be enabled.
 # If you managed to buy an ISA x86-64 box you'll have to fix all the
 # ISA drivers you need yourself.
 #
 
-mainmenu "Linux Kernel Configuration"
-
-config X86_64
-	bool
-	default y
-	help
-	  Port to the x86-64 architecture. x86-64 is a 64-bit extension to the
-	  classical 32-bit x86 architecture. For details see
-	  <http://www.x86-64.org/>.
+if X86_64
 
 config 64BIT
 	def_bool y
@@ -300,4 +290,4 @@ config SYSVIPC_COMPAT
 	depends on COMPAT && SYSVIPC
 	default y
 
-source "arch/x86/Kconfig"
+endif # X86_64
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 5959412..1ad6f7f 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -4,12 +4,7 @@
 
 PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
 
-# If a arch/$(SRCARCH)/Kconfig.$(ARCH) file exist use it
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/Kconfig.$(ARCH)),)
-        Kconfig := arch/$(SRCARCH)/Kconfig.$(ARCH)
-else
-        Kconfig := arch/$(SRCARCH)/Kconfig
-endif
+Kconfig := arch/$(SRCARCH)/Kconfig
 
 xconfig: $(obj)/qconf
 	$< $(Kconfig)
-- 
1.5.3.4.1157.g0e74-dirty


  reply	other threads:[~2007-11-03 23:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 23:51 [PATCH 01/10] x86: unification of cfufreq/Kconfig Sam Ravnborg
2007-11-03 23:51 ` [PATCH 02/10] x86: start unification of arch/x86/Kconfig.* Sam Ravnborg
2007-11-03 23:51   ` [PATCH 03/10] x86: arch/x86/Kconfig.cpu unification Sam Ravnborg
2007-11-03 23:51     ` [PATCH 04/10] x86: add X86_32 dependency to i386 specific symbols in Kconfig.i386 Sam Ravnborg
2007-11-03 23:51       ` [PATCH 05/10] x86: add X86_64 dependency to x86_64 specific symbols in Kconig.x86_64 Sam Ravnborg
2007-11-03 23:51         ` [PATCH 06/10] x86: copy x86_64 specific Kconfig symbols to Kconifg.i386 Sam Ravnborg
2007-11-03 23:51           ` [PATCH 07/10] x86: add remaning bits from x86_64 to Kconfig.i386 Sam Ravnborg
2007-11-03 23:51             ` [PATCH 08/10] x86: combine all config options with prompts in Kconfig Sam Ravnborg
2007-11-03 23:51               ` Sam Ravnborg [this message]
2007-11-03 23:51                 ` [PATCH 10/10] x86: enable make ARCH=x86 Sam Ravnborg
2007-11-06  0:53     ` [PATCH 03/10] x86: arch/x86/Kconfig.cpu unification Brian Gerst
2007-11-06  2:46       ` Sam Ravnborg
2007-11-06  2:52         ` Adrian Bunk
2007-11-06  7:10           ` Brian Gerst
2007-11-04  1:44   ` [PATCH 02/10] x86: start unification of arch/x86/Kconfig.* Adrian Bunk
2007-11-04 18:07     ` Sam Ravnborg
2007-11-04  1:28 ` [PATCH 01/10] x86: unification of cfufreq/Kconfig Adrian Bunk
2007-11-04  8:35   ` Sam Ravnborg
2007-11-06  7:38 ` Dave Jones
2007-11-06  8:13   ` Sam Ravnborg
2007-11-06 10:49     ` Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1194133881756-git-send-email-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.