The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Loic Grenie <loic.grenie@gmail.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH] Add CONFIG_BITS to remove the test in arch/x86/Makefile
Date: Mon, 26 Nov 2007 14:36:07 +0100	[thread overview]
Message-ID: <E1Iwe87-0003X7-47@localhost> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

    I propose the following patch to arch/x86/Makefile and Kconfig.

Actions:

     - Add a BITS variable to Kconfig which takes value 32 or 64 according
       to 64BIT.
     - Modify arch/x86/Makefile to use CONFIG_BITS instead of testing
       ARCH.

How this could be expanded:

     - Either remove BITS from arch/x86/Makefile_?? or change its definition
       (I expect to do one of those if my patch is accepted).
     - Add it to other arhitectures ? Maybe CONFIG_BITS could be useful
       somewhere in the code ?


    Kindly,

        Loïc Grenié


Signed-off-by: Loïc Grenié <loic.grenie@gmail.com>
---
 arch/x86/Kconfig  |    5 +++++
 arch/x86/Makefile |    9 ++-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 368864d..c0935fd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -15,6 +15,11 @@ config X86_32
 config X86_64
 	def_bool 64BIT
 
+config BITS
+	int
+	default "64" if 64BIT
+	default "32"
+
 ### Arch settings
 config X86
 	bool
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 116b03a..035adba 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -10,11 +10,6 @@ endif
 # No need to remake these files
 $(srctree)/arch/x86/Makefile%: ;
 
-ifeq ($(CONFIG_X86_32),y)
-        include $(srctree)/arch/x86/Makefile_32
-else
-        include $(srctree)/arch/x86/Makefile_64
-endif
-
-
+CONFIG_BITS ?= 32
 
+include $(srctree)/arch/x86/Makefile_$(CONFIG_BITS)
-- 
1.5.3.4


             reply	other threads:[~2007-11-26 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26 13:36 Loic Grenie [this message]
2007-11-26 16:18 ` [RFC PATCH] Add CONFIG_BITS to remove the test in arch/x86/Makefile Stephen Rothwell

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=E1Iwe87-0003X7-47@localhost \
    --to=loic.grenie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox