[RFC - GIT pull] first step to get rid of x86_64 and i386 dirs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Ravnborg
Date: Wednesday, October 24, 2007 - 2:30 pm

Hi Ingo.

This is first step in getting rid of the two directories.
I had to do some very minor modifications in common files
to let it work out - but nothing really hackish.

If you & Thomas + hpa are OK with the changes they can be
pulled from:

	git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86.git

As this is mostly renames I have attached a git -M diff only.

The remaining stuff is Kconfig files.

Before looking into these I am hoping someone could
step in and make the two Kconfig.debug
files 100% equal - because then I can fix the kconfig
stuff and finally kill the two directories.

	Sam


commit 4aaac9bda3be500750347129ee13d63e80bf4b9f
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Wed Oct 24 23:00:06 2007 +0200

    x86: move defconfig files for i386 and x86_64 to x86
    
    With some small changes to kconfig makefile we can now
    locate the defconfig files for i386 and x86_64 in
    the configs/ subdirectory under x86.
    
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

commit f745ab20e4697829100edfe29035d491f7efdc42
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Wed Oct 24 22:44:11 2007 +0200

    x86: move i386 and x86_64 Makefiles to arch/x86
    
    Moving the ARCH specific MAkefiles for i386 and x86_64
    required a litle bit tweaking in the top-lvel Makefile.
    But this is one of the final steps to get rid of the
    x86_64 and i386 directories.
    
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


git diff -M --stat:

 Makefile                                           |    7 +++++--
 arch/{i386/Makefile => x86/Makefile_32}            |    4 ++--
 arch/{i386/Makefile.cpu => x86/Makefile_32.cpu}    |    0 
 arch/{x86_64/Makefile => x86/Makefile_64}          |    2 +-
 .../{i386/defconfig => x86/configs/i386_defconfig} |    0 
 .../defconfig => x86/configs/x86_64_defconfig}     |    0 
 scripts/kconfig/Makefile                           |    6 +++---
 7 files changed, 11 insertions(+), 8 deletions(-)

git diff -M:

diff --git a/Makefile b/Makefile
index 2a47290..8816060 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,9 @@ CROSS_COMPILE	?=
 UTS_MACHINE 	:= $(ARCH)
 SRCARCH 	:= $(ARCH)
 
+# for i386 and x86_64 we use SRCARCH equal to x86
+SRCARCH := $(if $(filter x86_64 i386,$(SRCARCH)),x86,$(SRCARCH))
+
 KCONFIG_CONFIG	?= .config
 
 # SHELL used by kbuild
@@ -418,7 +421,7 @@ ifeq ($(config-targets),1)
 # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
 # KBUILD_DEFCONFIG may point out an alternative default configuration
 # used for 'make defconfig'
-include $(srctree)/arch/$(ARCH)/Makefile
+include $(srctree)/arch/$(SRCARCH)/Makefile
 export KBUILD_DEFCONFIG
 
 config %config: scripts_basic outputmakefile FORCE
@@ -497,7 +500,7 @@ else
 KBUILD_CFLAGS	+= -O2
 endif
 
-include $(srctree)/arch/$(ARCH)/Makefile
+include $(srctree)/arch/$(SRCARCH)/Makefile
 
 ifdef CONFIG_FRAME_POINTER
 KBUILD_CFLAGS	+= -fno-omit-frame-pointer -fno-optimize-sibling-calls
diff --git a/arch/i386/Makefile b/arch/x86/Makefile_32
similarity index 98%
rename from arch/i386/Makefile
rename to arch/x86/Makefile_32
index f5b9a37..c0b81d0 100644
--- a/arch/i386/Makefile
+++ b/arch/x86/Makefile_32
@@ -1,5 +1,5 @@
 #
-# i386/Makefile
+# i386 Makefile
 #
 # This file is included by the global makefile so that you can add your own
 # architecture-specific flags and dependencies. Remember to do have actions
@@ -46,7 +46,7 @@ KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
 KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
 
 # CPU-specific tuning. Anything which can be shared with UML should go here.
-include $(srctree)/arch/i386/Makefile.cpu
+include $(srctree)/arch/x86/Makefile_32.cpu
 
 # temporary until string.h is fixed
 cflags-y += -ffreestanding
diff --git a/arch/i386/Makefile.cpu b/arch/x86/Makefile_32.cpu
similarity index 100%
rename from arch/i386/Makefile.cpu
rename to arch/x86/Makefile_32.cpu
diff --git a/arch/x86_64/Makefile b/arch/x86/Makefile_64
similarity index 99%
rename from arch/x86_64/Makefile
rename to arch/x86/Makefile_64
index 20eb69b..52adc8c 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86/Makefile_64
@@ -1,5 +1,5 @@
 #
-# x86_64/Makefile
+# x86_64 Makefile
 #
 # This file is included by the global makefile so that you can add your own
 # architecture-specific flags and dependencies. Remember to do have actions
diff --git a/arch/i386/defconfig b/arch/x86/configs/i386_defconfig
similarity index 100%
rename from arch/i386/defconfig
rename to arch/x86/configs/i386_defconfig
diff --git a/arch/x86_64/defconfig b/arch/x86/configs/x86_64_defconfig
similarity index 100%
rename from arch/x86_64/defconfig
rename to arch/x86/configs/x86_64_defconfig
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 83c5e76..fbf39cc 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -60,12 +60,12 @@ defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
 	$< -d arch/$(ARCH)/Kconfig
 else
-	@echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
-	$(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig
+	@echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
+	$(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig
 endif
 
 %_defconfig: $(obj)/conf
-	$(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig
+	$(Q)$< -D arch/$(SRCARCH)/configs/$@ arch/$(ARCH)/Kconfig
 
 # Help text used by make help
 help:
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Linux v2.6.24-rc1, Linus Torvalds, (Tue Oct 23, 9:19 pm)
Re: Linux v2.6.24-rc1, Willy Tarreau, (Tue Oct 23, 9:49 pm)
Re: Linux v2.6.24-rc1, Dave Young, (Tue Oct 23, 10:22 pm)
Re: Linux v2.6.24-rc1, Ingo Molnar, (Wed Oct 24, 12:23 am)
Re: Linux v2.6.24-rc1, Ohad Ben-Cohen, (Wed Oct 24, 12:32 am)
Re: Linux v2.6.24-rc1, Dave Young, (Wed Oct 24, 12:33 am)
Re: Linux v2.6.24-rc1, Ingo Molnar, (Wed Oct 24, 1:04 am)
Re: Linux v2.6.24-rc1, Christoph Hellwig, (Wed Oct 24, 1:04 am)
Re: Linux v2.6.24-rc1, Jens Axboe, (Wed Oct 24, 1:12 am)
Re: Linux v2.6.24-rc1, Sam Ravnborg, (Wed Oct 24, 4:07 am)
[git pull] x86 arch updates, Ingo Molnar, (Wed Oct 24, 4:30 am)
Re: [git pull] x86 arch updates, Jeff Garzik, (Wed Oct 24, 4:48 am)
Re: [git pull] x86 arch updates, Ingo Molnar, (Wed Oct 24, 5:03 am)
Re: Linux v2.6.24-rc1, Ingo Molnar, (Wed Oct 24, 5:12 am)
Re: Linux v2.6.24-rc1, Sam Ravnborg, (Wed Oct 24, 5:21 am)
2.6.24-rc1 fails with lockup and BUG:, Romano Giannetti, (Wed Oct 24, 6:25 am)
Re: 2.6.24-rc1 fails with lockup and BUG:, Ingo Molnar, (Wed Oct 24, 7:27 am)
Re: 2.6.24-rc1 fails with lockup and BUG:, Romano Giannetti, (Wed Oct 24, 8:53 am)
Re: 2.6.24-rc1 fails with lockup and BUG:, Ingo Molnar, (Wed Oct 24, 8:55 am)
Re: 2.6.24-rc1 fails with lockup and BUG:, Peter Zijlstra, (Wed Oct 24, 9:11 am)
Re: 2.6.24-rc1 fails with lockup and BUG:, Joseph Fannin, (Wed Oct 24, 9:44 am)
Re: Linux v2.6.24-rc1, Giacomo Catenazzi, (Wed Oct 24, 11:19 am)
[patch] portman2x4.c: fix boot hang, Ingo Molnar, (Wed Oct 24, 12:44 pm)
Re: [patch] portman2x4.c: fix boot hang, Frans Pop, (Wed Oct 24, 1:12 pm)
Re: [patch] portman2x4.c: fix boot hang, Ingo Molnar, (Wed Oct 24, 2:29 pm)
[RFC - GIT pull] first step to get rid of x86_64 and i386 dirs, Sam Ravnborg, (Wed Oct 24, 2:30 pm)
2.6.24-rc1 doesn't build..., Theodore Tso, (Wed Oct 24, 10:18 pm)
Re: 2.6.24-rc1 doesn't build..., Kamalesh Babulal, (Wed Oct 24, 10:30 pm)
Re: [patch] portman2x4.c: fix boot hang, Takashi Iwai, (Thu Oct 25, 1:16 am)
Re: Linux v2.6.24-rc1, edz_mania, (Thu Oct 25, 5:45 am)
[PATCH] Dump filtering supports x86_64 sparsemem(Re: Linux ..., Ken'ichi Ohmichi, (Thu Oct 25, 10:19 pm)
Re: 2.6.24-rc1 fails with lockup and BUG:, Romano Giannetti, (Thu Oct 25, 10:57 pm)
Re: 2.6.24-rc1 fails with lockup and BUG:, Romano Giannetti, (Thu Oct 25, 10:59 pm)
Re: 2.6.24-rc1 fails with lockup - /sbin/ifconfig / inet_i ..., Stephen Hemminger, (Fri Oct 26, 9:48 am)
[PATCH] r8169: don't call napi_disable if not doing NAPI, Stephen Hemminger, (Fri Oct 26, 11:33 am)
Re: [PATCH] r8169: don't call napi_disable if not doing NAPI, Francois Romieu, (Fri Oct 26, 1:17 pm)
Re: [PATCH] r8169: don't call napi_disable if not doing NAPI, Romano Giannetti, (Sun Oct 28, 3:18 pm)
Re: [PATCH] r8169: don't call napi_disable if not doing NAPI, Romano Giannetti, (Mon Oct 29, 1:56 am)
Re: [Bug 9246] On 2.6.24-rc1-gc9927c2b BUG: unable to hand ..., Giacomo A. Catenazzi, (Tue Dec 4, 9:47 am)
Re: [Bug 9246] On 2.6.24-rc1-gc9927c2b BUG: unable to hand ..., Giacomo A. Catenazzi, (Wed Dec 5, 2:26 am)