All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] Add CONFIG_BITS to remove the test in arch/x86/Makefile
@ 2007-11-26 13:36 Loic Grenie
  2007-11-26 16:18 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Grenie @ 2007-11-26 13:36 UTC (permalink / raw)
  To: Linux Kernel

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH] Add CONFIG_BITS to remove the test in arch/x86/Makefile
  2007-11-26 13:36 [RFC PATCH] Add CONFIG_BITS to remove the test in arch/x86/Makefile Loic Grenie
@ 2007-11-26 16:18 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2007-11-26 16:18 UTC (permalink / raw)
  To: Loic Grenie; +Cc: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On Mon, 26 Nov 2007 14:36:07 +0100 Loic Grenie <loic.grenie@gmail.com> wrote:
>
>     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.

Linus' suggestion was WORD_SIZE and that is what we have already used in
powerpc.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-26 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 13:36 [RFC PATCH] Add CONFIG_BITS to remove the test in arch/x86/Makefile Loic Grenie
2007-11-26 16:18 ` Stephen Rothwell

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.