All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] [PATCH] subarch cleanup
@ 2002-11-20  0:00 john stultz
  2002-11-21 18:33 ` Sam Ravnborg
  0 siblings, 1 reply; 14+ messages in thread
From: john stultz @ 2002-11-20  0:00 UTC (permalink / raw)
  To: J.E.J. Bottomley; +Cc: lkml, Martin J. Bligh

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

James, All,

	This is a small patch to try to somewhat cleanup the subarch code.
First it moves all the subarch .h files out of arch/i386/mach-xyz into
include/asm-i386/mach-xyz, then it changes the include patch to include
include/asm-i386/mach-xyz and include/asm-i386/mach-generic when
compiling. This allows the compiler to use the arch specific .h files
when needed, and then falls back to the generic .h files if no subarch
specific changes are needed. 

Obviously this doesn't work with .c files, so I've split up the Makefile
MACHINE variable into MACHINE_H and MACHINE_C, so subarchs like summit
which does not need any subarch specific .c files can just use the
generic files. 

The patch is bziped due to its size, but that is mainly due to moving
all the .h files, the only file changed is arch/i386/Makefile and I've
inlined that diff below.

Please let me know if you have any comments, flames or suggestions.

thanks
-john

diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile
--- a/arch/i386/Makefile	Mon Nov 18 18:12:25 2002
+++ b/arch/i386/Makefile	Mon Nov 18 18:12:25 2002
@@ -47,9 +47,11 @@
 CFLAGS += $(cflags-y)
 
 ifdef CONFIG_VISWS
-MACHINE	:= mach-visws
+MACHINE_C	:= mach-visws
+MACHINE_H	:= mach-visws
 else
-MACHINE	:= mach-generic
+MACHINE_C	:= mach-generic
+MACHINE_H	:= mach-generic
 endif
 
 HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
@@ -57,14 +59,14 @@
 libs-y 					+= arch/i386/lib/
 core-y					+= arch/i386/kernel/ \
 					   arch/i386/mm/ \
-					   arch/i386/$(MACHINE)/
+					   arch/i386/$(MACHINE_C)/
 drivers-$(CONFIG_MATH_EMULATION)	+= arch/i386/math-emu/
 drivers-$(CONFIG_PCI)			+= arch/i386/pci/
 # FIXME: is drivers- right ?
 drivers-$(CONFIG_OPROFILE)		+= arch/i386/oprofile/
 
-CFLAGS += -Iarch/i386/$(MACHINE)
-AFLAGS += -Iarch/i386/$(MACHINE)
+CFLAGS += -Iinclude/asm-i386/$(MACHINE_H) -Iinclude/asm-i386/mach-generic
+AFLAGS += -Iinclude/asm-i386/$(MACHINE_H) -Iinclude/asm-i386/mach-generic
 
 makeboot = $(call descend,arch/i386/boot,$(1))



[-- Attachment #2: linux-2.5.48_subarch-cleanup_A0.patch.bz2 --]
[-- Type: application/x-bzip, Size: 8671 bytes --]

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

end of thread, other threads:[~2002-11-22 17:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20  0:00 [RFC] [PATCH] subarch cleanup john stultz
2002-11-21 18:33 ` Sam Ravnborg
2002-11-21 18:35   ` Martin J. Bligh
2002-11-21 19:34     ` Russell King
2002-11-21 21:47       ` Martin J. Bligh
2002-11-22 15:00     ` J.E.J. Bottomley
2002-11-22 15:42       ` Martin J. Bligh
2002-11-22 16:40         ` J.E.J. Bottomley
2002-11-22 16:57           ` Christoph Hellwig
2002-11-22 17:20           ` Martin J. Bligh
2002-11-22 17:55             ` J.E.J. Bottomley
2002-11-21 18:55   ` john stultz
2002-11-21 19:15     ` Sam Ravnborg
2002-11-21 20:27       ` Alan Cox

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.