public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
@ 2007-03-15  5:13 Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 01/20] early_printk.c switch Steven Rostedt
                   ` (21 more replies)
  0 siblings, 22 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

Once again here's an attempt to put the shared files of x86_64 and i386
into a separate directory.

This time, I took the pains to make sure that each patch in this
series compiles after it is applied.  I did this on both x86_64 as well
as i386, with the affected files config options turned on.

I still stayed away from the pci shared code.

This time I moved the speedstep-lib.h into include/asm-x86. Although all
references to this files now needs to explicitly state
 #include <asm-x86/speedstep-lib.h>
But this will also create a doorway for other shared headers to go
into.

And yes the long term goal is to perhaps make a single arch that can
handle both the i386 modern CPUs as well as the x86_64 code. And then
phase out the x86_64, keeping the current i386 for legacy hardware.

Used git-diff -M for the diffs, so the renames are explicitly stated
as such, but no delete/create diff is made (so patch and quilt will
not apply theses).

Comments and flames welcome.

-- Steve


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

* [PATCH take3 01/20] early_printk.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 02/20] tsc_sync.c switch Steven Rostedt
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 00-early_printk.patch-update --]
[-- Type: text/plain, Size: 2577 bytes --]

Move the early_printk.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 4ae3dcf..a57040d 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -35,7 +35,6 @@ obj-$(CONFIG_ACPI_SRAT) 	+= srat.o
 obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
 obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault.o
 obj-$(CONFIG_VM86)		+= vm86.o
-obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
 obj-$(CONFIG_K8_NB)		+= k8.o
 
diff --git a/arch/i386/kernel/early_printk.c b/arch/i386/kernel/early_printk.c
deleted file mode 100644
index 92f812b..0000000
--- a/arch/i386/kernel/early_printk.c
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#include "../../x86_64/kernel/early_printk.c"
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
new file mode 100644
index 0000000..55f268f
--- /dev/null
+++ b/arch/x86/kernel/Makefile
@@ -0,0 +1,2 @@
+
+obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
similarity index 100%
rename from arch/x86_64/kernel/early_printk.c
rename to arch/x86/kernel/early_printk.c
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 2941a91..3cf9198 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -79,6 +79,7 @@ head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kern
 
 libs-y 					+= arch/x86_64/lib/
 core-y					+= arch/x86_64/kernel/ \
+					   arch/x86/kernel/ \
 					   arch/x86_64/mm/ \
 					   arch/x86_64/crypto/
 core-$(CONFIG_IA32_EMULATION)		+= arch/x86_64/ia32/
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index bb47e86..8b2535c 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -28,7 +28,6 @@ obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
 obj-$(CONFIG_PM)		+= suspend.o
 obj-$(CONFIG_SOFTWARE_SUSPEND)	+= suspend_asm.o
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
-obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 obj-$(CONFIG_IOMMU)		+= pci-gart.o aperture.o
 obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary.o tce.o
 obj-$(CONFIG_SWIOTLB)		+= pci-swiotlb.o
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index bd28f9f..d73a830 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -100,6 +100,7 @@ head-y := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
 
 libs-y 					+= arch/i386/lib/
 core-y					+= arch/i386/kernel/ \
+					   arch/x86/kernel/ \
 					   arch/i386/mm/ \
 					   arch/i386/$(mcore-y)/ \
 					   arch/i386/crypto/

--

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

* [PATCH take3 02/20] tsc_sync.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 01/20] early_printk.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 03/20] bootflag.c switch Steven Rostedt
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 02-tsc_sync.patch --]
[-- Type: text/plain, Size: 1955 bytes --]

Move tsc_sync.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index a57040d..c8fe439 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_APM)		+= apm.o
-obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o tsc_sync.o
+obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
 obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o nmi.o
diff --git a/arch/i386/kernel/tsc_sync.c b/arch/i386/kernel/tsc_sync.c
deleted file mode 100644
index 1242462..0000000
--- a/arch/i386/kernel/tsc_sync.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../x86_64/kernel/tsc_sync.c"
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 55f268f..bd548e6 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,2 +1,7 @@
 
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
+
+# i386 defines CONFIG_X86_SMP when CONFIG_SMP and !CONFIG_X86_VOYAGER
+ifeq ($(CONFIG_X86_VOYAGER), )
+obj-$(CONFIG_SMP)		+= tsc_sync.o
+endif
diff --git a/arch/x86_64/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
similarity index 100%
rename from arch/x86_64/kernel/tsc_sync.c
rename to arch/x86/kernel/tsc_sync.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 8b2535c..54fe500 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -19,7 +19,7 @@ obj-$(CONFIG_ACPI)		+= acpi/
 obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
-obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o tsc_sync.o
+obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o
 obj-y				+= apic.o  nmi.o
 obj-y				+= io_apic.o mpparse.o \
 		genapic.o genapic_cluster.o genapic_flat.o

--

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

* [PATCH take3 03/20] bootflag.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 01/20] early_printk.c switch Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 02/20] tsc_sync.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 04/20] quirks.c switch Steven Rostedt
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 03-bootflag.patch --]
[-- Type: text/plain, Size: 2050 bytes --]

Move the bootflag.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index c8fe439..4622355 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -6,7 +6,7 @@ extra-y := head.o init_task.o vmlinux.lds
 
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
-		pci-dma.o i386_ksyms.o i387.o bootflag.o e820.o\
+		pci-dma.o i386_ksyms.o i387.o e820.o\
 		quirks.o i8237.o topology.o alternative.o i8253.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index bd548e6..fe2e4ea 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,3 +1,4 @@
+obj-y				+= bootflag.o
 
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
diff --git a/arch/i386/kernel/bootflag.c b/arch/x86/kernel/bootflag.c
similarity index 100%
rename from arch/i386/kernel/bootflag.c
rename to arch/x86/kernel/bootflag.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 54fe500..1ffc4ea 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -7,7 +7,7 @@ EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \
+		setup64.o e820.o reboot.o quirks.o i8237.o \
 		pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
@@ -47,7 +47,6 @@ obj-y				+= pcspeaker.o
 CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
-bootflag-y			+= ../../i386/kernel/bootflag.o
 cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 topology-y                     += ../../i386/kernel/topology.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o

--

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

* [PATCH take3 04/20] quirks.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (2 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 03/20] bootflag.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 05/20] i8237.c switch Steven Rostedt
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 05-quirks.patch --]
[-- Type: text/plain, Size: 2137 bytes --]

Move the quirks.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 4622355..c5c62af 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
 		pci-dma.o i386_ksyms.o i387.o e820.o\
-		quirks.o i8237.o topology.o alternative.o i8253.o tsc.o
+		i8237.o topology.o alternative.o i8253.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index fe2e4ea..26feab4 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,4 +1,4 @@
-obj-y				+= bootflag.o
+obj-y				+= bootflag.o quirks.o
 
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
diff --git a/arch/i386/kernel/quirks.c b/arch/x86/kernel/quirks.c
similarity index 100%
rename from arch/i386/kernel/quirks.c
rename to arch/x86/kernel/quirks.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 1ffc4ea..533d4bb 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -7,7 +7,7 @@ EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o e820.o reboot.o quirks.o i8237.o \
+		setup64.o e820.o reboot.o i8237.o \
 		pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
@@ -51,7 +51,6 @@ cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 topology-y                     += ../../i386/kernel/topology.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
-quirks-y			+= ../../i386/kernel/quirks.o
 i8237-y				+= ../../i386/kernel/i8237.o
 msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
 alternative-y			+= ../../i386/kernel/alternative.o

--

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

* [PATCH take3 05/20] i8237.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (3 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 04/20] quirks.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 06/20] topology.c switch Steven Rostedt
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 06-i8237.patch --]
[-- Type: text/plain, Size: 2121 bytes --]

Move the i8237.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index c5c62af..1052659 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
 		pci-dma.o i386_ksyms.o i387.o e820.o\
-		i8237.o topology.o alternative.o i8253.o tsc.o
+		topology.o alternative.o i8253.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 26feab4..19921b9 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,4 +1,4 @@
-obj-y				+= bootflag.o quirks.o
+obj-y				+= bootflag.o quirks.o i8237.o
 
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
diff --git a/arch/i386/kernel/i8237.c b/arch/x86/kernel/i8237.c
similarity index 100%
rename from arch/i386/kernel/i8237.c
rename to arch/x86/kernel/i8237.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 533d4bb..c04f7a6 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -7,7 +7,7 @@ EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o e820.o reboot.o i8237.o \
+		setup64.o e820.o reboot.o \
 		pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
@@ -51,7 +51,6 @@ cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 topology-y                     += ../../i386/kernel/topology.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
-i8237-y				+= ../../i386/kernel/i8237.o
 msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
 alternative-y			+= ../../i386/kernel/alternative.o
 pcspeaker-y			+= ../../i386/kernel/pcspeaker.o

--

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

* [PATCH take3 06/20] topology.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (4 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 05/20] i8237.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 07/20] alternative.c switch Steven Rostedt
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 07-topology.patch --]
[-- Type: text/plain, Size: 1948 bytes --]

Move the topology.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 1052659..556da60 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
 		pci-dma.o i386_ksyms.o i387.o e820.o\
-		topology.o alternative.o i8253.o tsc.o
+		alternative.o i8253.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 19921b9..d70dbf3 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,4 +1,4 @@
-obj-y				+= bootflag.o quirks.o i8237.o
+obj-y				+= bootflag.o quirks.o i8237.o topology.o
 
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
diff --git a/arch/i386/kernel/topology.c b/arch/x86/kernel/topology.c
similarity index 100%
rename from arch/i386/kernel/topology.c
rename to arch/x86/kernel/topology.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index c04f7a6..3dc4c18 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -40,7 +40,6 @@ obj-$(CONFIG_AUDIT)		+= audit.o
 obj-$(CONFIG_MODULES)		+= module.o
 obj-$(CONFIG_PCI)		+= early-quirks.o
 
-obj-y				+= topology.o
 obj-y				+= intel_cacheinfo.o
 obj-y				+= pcspeaker.o
 
@@ -48,7 +47,6 @@ CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
 cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
-topology-y                     += ../../i386/kernel/topology.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o

--

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

* [PATCH take3 07/20] alternative.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (5 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 06/20] topology.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 08/20] msr.c switch Steven Rostedt
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 08-alternative.patch --]
[-- Type: text/plain, Size: 2062 bytes --]

Move the alternative.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 556da60..44c7d89 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
 		pci-dma.o i386_ksyms.o i387.o e820.o\
-		alternative.o i8253.o tsc.o
+		i8253.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index d70dbf3..b63f832 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,4 +1,4 @@
-obj-y				+= bootflag.o quirks.o i8237.o topology.o
+obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
diff --git a/arch/i386/kernel/alternative.c b/arch/x86/kernel/alternative.c
similarity index 100%
rename from arch/i386/kernel/alternative.c
rename to arch/x86/kernel/alternative.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 3dc4c18..b12901c 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -8,7 +8,7 @@ obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
 		setup64.o e820.o reboot.o \
-		pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o
+		pci-dma.o pci-nommu.o hpet.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-$(CONFIG_X86_MCE)		+= mce.o therm_throt.o
@@ -50,5 +50,4 @@ cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
-alternative-y			+= ../../i386/kernel/alternative.o
 pcspeaker-y			+= ../../i386/kernel/pcspeaker.o

--

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

* [PATCH take3 08/20] msr.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (6 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 07/20] alternative.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 09/20] cpuid.c switch Steven Rostedt
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 09-msr.patch --]
[-- Type: text/plain, Size: 1996 bytes --]

Move the msr.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 44c7d89..5276349 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -14,7 +14,6 @@ obj-y				+= cpu/
 obj-y				+= acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
 obj-$(CONFIG_MCA)		+= mca.o
-obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_APM)		+= apm.o
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index b63f832..4e5a88f 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,5 +1,6 @@
 obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
+obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 # i386 defines CONFIG_X86_SMP when CONFIG_SMP and !CONFIG_X86_VOYAGER
diff --git a/arch/i386/kernel/msr.c b/arch/x86/kernel/msr.c
similarity index 100%
rename from arch/i386/kernel/msr.c
rename to arch/x86/kernel/msr.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index b12901c..248dbe8 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -16,7 +16,6 @@ obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
 obj-$(CONFIG_X86_MCE_AMD)	+= mce_amd.o
 obj-$(CONFIG_MTRR)		+= ../../i386/kernel/cpu/mtrr/
 obj-$(CONFIG_ACPI)		+= acpi/
-obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o
@@ -49,5 +48,4 @@ therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
 cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
-msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
 pcspeaker-y			+= ../../i386/kernel/pcspeaker.o

--

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

* [PATCH take3 09/20] cpuid.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (7 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 08/20] msr.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 10/20] microcode.c switch Steven Rostedt
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 10-cpuid.patch --]
[-- Type: text/plain, Size: 2041 bytes --]

Move the cpuid.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 5276349..4437181 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -14,7 +14,6 @@ obj-y				+= cpu/
 obj-y				+= acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
 obj-$(CONFIG_MCA)		+= mca.o
-obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 4e5a88f..912421a 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,6 +1,7 @@
 obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
 obj-$(CONFIG_X86_MSR)		+= msr.o
+obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 # i386 defines CONFIG_X86_SMP when CONFIG_SMP and !CONFIG_X86_VOYAGER
diff --git a/arch/i386/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
similarity index 100%
rename from arch/i386/kernel/cpuid.c
rename to arch/x86/kernel/cpuid.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 248dbe8..f5997f3 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -17,7 +17,6 @@ obj-$(CONFIG_X86_MCE_AMD)	+= mce_amd.o
 obj-$(CONFIG_MTRR)		+= ../../i386/kernel/cpu/mtrr/
 obj-$(CONFIG_ACPI)		+= acpi/
 obj-$(CONFIG_MICROCODE)		+= microcode.o
-obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o
 obj-y				+= apic.o  nmi.o
 obj-y				+= io_apic.o mpparse.o \
@@ -45,7 +44,6 @@ obj-y				+= pcspeaker.o
 CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
-cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 pcspeaker-y			+= ../../i386/kernel/pcspeaker.o

--

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

* [PATCH take3 10/20] microcode.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (8 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 09/20] cpuid.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 11/20] pcspeaker.c switch Steven Rostedt
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 11-microcode.patch --]
[-- Type: text/plain, Size: 2047 bytes --]

Move the microcode.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 4437181..ac925bc 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -14,7 +14,6 @@ obj-y				+= cpu/
 obj-y				+= acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
 obj-$(CONFIG_MCA)		+= mca.o
-obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 912421a..f1c6b2e 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -2,6 +2,7 @@ obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
 obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
+obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 # i386 defines CONFIG_X86_SMP when CONFIG_SMP and !CONFIG_X86_VOYAGER
diff --git a/arch/i386/kernel/microcode.c b/arch/x86/kernel/microcode.c
similarity index 100%
rename from arch/i386/kernel/microcode.c
rename to arch/x86/kernel/microcode.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index f5997f3..08795d8 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -16,7 +16,6 @@ obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
 obj-$(CONFIG_X86_MCE_AMD)	+= mce_amd.o
 obj-$(CONFIG_MTRR)		+= ../../i386/kernel/cpu/mtrr/
 obj-$(CONFIG_ACPI)		+= acpi/
-obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o
 obj-y				+= apic.o  nmi.o
 obj-y				+= io_apic.o mpparse.o \
@@ -44,6 +43,5 @@ obj-y				+= pcspeaker.o
 CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
-microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 pcspeaker-y			+= ../../i386/kernel/pcspeaker.o

--

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

* [PATCH take3 11/20] pcspeaker.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (9 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 10/20] microcode.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 12/20] mtrr directory switch Steven Rostedt
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 12-pcspeaker.patch --]
[-- Type: text/plain, Size: 1636 bytes --]

Move the pcspeaker.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index ac925bc..ce1f742 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -37,7 +37,6 @@ obj-$(CONFIG_K8_NB)		+= k8.o
 
 obj-$(CONFIG_VMI)		+= vmi.o vmitime.o
 obj-$(CONFIG_PARAVIRT)		+= paravirt.o
-obj-y				+= pcspeaker.o
 
 EXTRA_AFLAGS   := -traditional
 
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index f1c6b2e..3e15c9e 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -5,6 +5,8 @@ obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
+obj-y				+= pcspeaker.o
+
 # i386 defines CONFIG_X86_SMP when CONFIG_SMP and !CONFIG_X86_VOYAGER
 ifeq ($(CONFIG_X86_VOYAGER), )
 obj-$(CONFIG_SMP)		+= tsc_sync.o
diff --git a/arch/i386/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c
similarity index 100%
rename from arch/i386/kernel/pcspeaker.c
rename to arch/x86/kernel/pcspeaker.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 08795d8..3fae694 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -38,10 +38,8 @@ obj-$(CONFIG_MODULES)		+= module.o
 obj-$(CONFIG_PCI)		+= early-quirks.o
 
 obj-y				+= intel_cacheinfo.o
-obj-y				+= pcspeaker.o
 
 CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
-pcspeaker-y			+= ../../i386/kernel/pcspeaker.o

--

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

* [PATCH take3 12/20] mtrr directory switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (10 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 11/20] pcspeaker.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 13/20] therm_throt.c switch Steven Rostedt
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 13-mtrr.patch --]
[-- Type: text/plain, Size: 3256 bytes --]

Move the mtrr directory over to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/cpu/Makefile b/arch/i386/kernel/cpu/Makefile
index 010aecf..f8eaef8 100644
--- a/arch/i386/kernel/cpu/Makefile
+++ b/arch/i386/kernel/cpu/Makefile
@@ -15,5 +15,4 @@ obj-y	+=	umc.o
 
 obj-$(CONFIG_X86_MCE)	+=	mcheck/
 
-obj-$(CONFIG_MTRR)	+= 	mtrr/
 obj-$(CONFIG_CPU_FREQ)	+=	cpufreq/
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 3e15c9e..c1a2b58 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,5 +1,7 @@
 obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
+obj-y				+= cpu/
+
 obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
new file mode 100644
index 0000000..3e59ae7
--- /dev/null
+++ b/arch/x86/kernel/cpu/Makefile
@@ -0,0 +1,2 @@
+
+obj-$(CONFIG_MTRR)	+= 	mtrr/
diff --git a/arch/i386/kernel/cpu/mtrr/Makefile b/arch/x86/kernel/cpu/mtrr/Makefile
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/Makefile
rename to arch/x86/kernel/cpu/mtrr/Makefile
diff --git a/arch/i386/kernel/cpu/mtrr/amd.c b/arch/x86/kernel/cpu/mtrr/amd.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/amd.c
rename to arch/x86/kernel/cpu/mtrr/amd.c
diff --git a/arch/i386/kernel/cpu/mtrr/centaur.c b/arch/x86/kernel/cpu/mtrr/centaur.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/centaur.c
rename to arch/x86/kernel/cpu/mtrr/centaur.c
diff --git a/arch/i386/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/cyrix.c
rename to arch/x86/kernel/cpu/mtrr/cyrix.c
diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/generic.c
rename to arch/x86/kernel/cpu/mtrr/generic.c
diff --git a/arch/i386/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/if.c
rename to arch/x86/kernel/cpu/mtrr/if.c
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/main.c
rename to arch/x86/kernel/cpu/mtrr/main.c
diff --git a/arch/i386/kernel/cpu/mtrr/mtrr.h b/arch/x86/kernel/cpu/mtrr/mtrr.h
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/mtrr.h
rename to arch/x86/kernel/cpu/mtrr/mtrr.h
diff --git a/arch/i386/kernel/cpu/mtrr/state.c b/arch/x86/kernel/cpu/mtrr/state.c
similarity index 100%
rename from arch/i386/kernel/cpu/mtrr/state.c
rename to arch/x86/kernel/cpu/mtrr/state.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 3fae694..60918ad 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -14,7 +14,6 @@ obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-$(CONFIG_X86_MCE)		+= mce.o therm_throt.o
 obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
 obj-$(CONFIG_X86_MCE_AMD)	+= mce_amd.o
-obj-$(CONFIG_MTRR)		+= ../../i386/kernel/cpu/mtrr/
 obj-$(CONFIG_ACPI)		+= acpi/
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o trampoline.o
 obj-y				+= apic.o  nmi.o

--

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

* [PATCH take3 13/20] therm_throt.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (11 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 12/20] mtrr directory switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 14/20] intel_cacheinfo.c switch Steven Rostedt
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 14-therm_throt.patch --]
[-- Type: text/plain, Size: 1926 bytes --]

Move the therm_throt.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/cpu/mcheck/Makefile b/arch/i386/kernel/cpu/mcheck/Makefile
index f1ebe1c..30808f3 100644
--- a/arch/i386/kernel/cpu/mcheck/Makefile
+++ b/arch/i386/kernel/cpu/mcheck/Makefile
@@ -1,2 +1,2 @@
-obj-y	=	mce.o k7.o p4.o p5.o p6.o winchip.o therm_throt.o
+obj-y	=	mce.o k7.o p4.o p5.o p6.o winchip.o
 obj-$(CONFIG_X86_MCE_NONFATAL)	+=	non-fatal.o
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 3e59ae7..e439cc1 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -1,2 +1,3 @@
 
+obj-$(CONFIG_X86_MCE)	+=	mcheck/
 obj-$(CONFIG_MTRR)	+= 	mtrr/
diff --git a/arch/x86/kernel/cpu/mcheck/Makefile b/arch/x86/kernel/cpu/mcheck/Makefile
new file mode 100644
index 0000000..4018cde
--- /dev/null
+++ b/arch/x86/kernel/cpu/mcheck/Makefile
@@ -0,0 +1 @@
+obj-y	= therm_throt.o
diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
similarity index 100%
rename from arch/i386/kernel/cpu/mcheck/therm_throt.c
rename to arch/x86/kernel/cpu/mcheck/therm_throt.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 60918ad..ef1585d 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -11,7 +11,7 @@ obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		pci-dma.o pci-nommu.o hpet.o tsc.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
-obj-$(CONFIG_X86_MCE)		+= mce.o therm_throt.o
+obj-$(CONFIG_X86_MCE)		+= mce.o
 obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
 obj-$(CONFIG_X86_MCE_AMD)	+= mce_amd.o
 obj-$(CONFIG_ACPI)		+= acpi/
@@ -40,5 +40,4 @@ obj-y				+= intel_cacheinfo.o
 
 CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
-therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o

--

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

* [PATCH take3 14/20] intel_cacheinfo.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (12 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 13/20] therm_throt.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 15/20] cpufreq files switched Steven Rostedt
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 15-intel_cacheinfo.patch --]
[-- Type: text/plain, Size: 1410 bytes --]

Move the intel_cacheinfo.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/cpu/Makefile b/arch/i386/kernel/cpu/Makefile
index f8eaef8..e484d74 100644
--- a/arch/i386/kernel/cpu/Makefile
+++ b/arch/i386/kernel/cpu/Makefile
@@ -8,7 +8,7 @@ obj-y	+=	amd.o
 obj-y	+=	cyrix.o
 obj-y	+=	centaur.o
 obj-y	+=	transmeta.o
-obj-y	+=	intel.o intel_cacheinfo.o
+obj-y	+=	intel.o
 obj-y	+=	rise.o
 obj-y	+=	nexgen.o
 obj-y	+=	umc.o
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index e439cc1..6557e4a 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -1,3 +1,4 @@
+obj-y			+=	intel_cacheinfo.o
 
 obj-$(CONFIG_X86_MCE)	+=	mcheck/
 obj-$(CONFIG_MTRR)	+= 	mtrr/
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
similarity index 100%
rename from arch/i386/kernel/cpu/intel_cacheinfo.c
rename to arch/x86/kernel/cpu/intel_cacheinfo.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index ef1585d..0a33b03 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -36,8 +36,5 @@ obj-$(CONFIG_AUDIT)		+= audit.o
 obj-$(CONFIG_MODULES)		+= module.o
 obj-$(CONFIG_PCI)		+= early-quirks.o
 
-obj-y				+= intel_cacheinfo.o
-
 CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
-intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o

--

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

* [PATCH take3 15/20] cpufreq files switched
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (13 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 14/20] intel_cacheinfo.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 16/20] acpi " Steven Rostedt
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 16-cpufreq.patch --]
[-- Type: text/plain, Size: 7137 bytes --]

Moved the shared files that were in the arch/i386/kernel/cpu/cpufreq to
the common area.  Since the speedstep-lib.h file was used by files that
were moved as well as files that were not moved, a new directory was
created to hold this shared header, called include/asm-x86.  Since this
directory is not full featured yet (no x86 arch fully defined) all references
to this file must be of #include <asm-x86/speedstep-lib.h>

But this allows for a stepping stone approach to a generic x86 arch and
a place to put more asm-x86 headers.

The Kconfig for cpufreq in the x86_64 arch directory is not moved
to simplify this patch.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Chris Wright <chrisw@sous-sol.org>

diff --git a/arch/i386/kernel/cpu/cpufreq/Makefile b/arch/i386/kernel/cpu/cpufreq/Makefile
index 560f776..49c4ca4 100644
--- a/arch/i386/kernel/cpu/cpufreq/Makefile
+++ b/arch/i386/kernel/cpu/cpufreq/Makefile
@@ -1,6 +1,6 @@
+# See also arch/x86/kernel/cpu/cpufreq/Makefile
 obj-$(CONFIG_X86_POWERNOW_K6)		+= powernow-k6.o
 obj-$(CONFIG_X86_POWERNOW_K7)		+= powernow-k7.o
-obj-$(CONFIG_X86_POWERNOW_K8)		+= powernow-k8.o
 obj-$(CONFIG_X86_LONGHAUL)		+= longhaul.o
 obj-$(CONFIG_X86_E_POWERSAVER)		+= e_powersaver.o
 obj-$(CONFIG_ELAN_CPUFREQ)		+= elanfreq.o
@@ -8,9 +8,5 @@ obj-$(CONFIG_SC520_CPUFREQ)		+= sc520_freq.o
 obj-$(CONFIG_X86_LONGRUN)		+= longrun.o  
 obj-$(CONFIG_X86_GX_SUSPMOD)		+= gx-suspmod.o
 obj-$(CONFIG_X86_SPEEDSTEP_ICH)		+= speedstep-ich.o
-obj-$(CONFIG_X86_SPEEDSTEP_LIB)		+= speedstep-lib.o
 obj-$(CONFIG_X86_SPEEDSTEP_SMI)		+= speedstep-smi.o
-obj-$(CONFIG_X86_ACPI_CPUFREQ)		+= acpi-cpufreq.o
-obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO)	+= speedstep-centrino.o
-obj-$(CONFIG_X86_P4_CLOCKMOD)		+= p4-clockmod.o
 obj-$(CONFIG_X86_CPUFREQ_NFORCE2)	+= cpufreq-nforce2.o
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
index b425cd3..97c14b3 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
@@ -25,7 +25,7 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 
-#include "speedstep-lib.h"
+#include <asm-x86/speedstep-lib.h>
 
 
 /* speedstep_chipset:
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
index ff0d898..093d7d0 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
@@ -22,7 +22,7 @@
 #include <linux/delay.h>
 #include <asm/ist.h>
 
-#include "speedstep-lib.h"
+#include <asm-x86/speedstep-lib.h>
 
 /* speedstep system management interface port/command.
  *
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 6557e4a..4728c89 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -2,3 +2,4 @@ obj-y			+=	intel_cacheinfo.o
 
 obj-$(CONFIG_X86_MCE)	+=	mcheck/
 obj-$(CONFIG_MTRR)	+= 	mtrr/
+obj-$(CONFIG_CPU_FREQ)	+=	cpufreq/
diff --git a/arch/x86/kernel/cpu/cpufreq/Makefile b/arch/x86/kernel/cpu/cpufreq/Makefile
new file mode 100644
index 0000000..883fae4
--- /dev/null
+++ b/arch/x86/kernel/cpu/cpufreq/Makefile
@@ -0,0 +1,6 @@
+
+obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o
+obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o
+obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
+obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o
+obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
rename to arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
rename to arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
index 4786fed..5024ea8 100644
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
@@ -33,7 +33,7 @@
 #include <asm/msr.h>
 #include <asm/timex.h>
 
-#include "speedstep-lib.h"
+#include <asm-x86/speedstep-lib.h>
 
 #define PFX	"p4-clockmod: "
 #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "p4-clockmod", msg)
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/powernow-k8.c
rename to arch/x86/kernel/cpu/cpufreq/powernow-k8.c
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/powernow-k8.h
rename to arch/x86/kernel/cpu/cpufreq/powernow-k8.h
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
rename to arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
rename to arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
index d59277c..2de6a69 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
@@ -17,7 +17,7 @@
 #include <linux/slab.h>
 
 #include <asm/msr.h>
-#include "speedstep-lib.h"
+#include <asm-x86/speedstep-lib.h>
 
 #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-lib", msg)
 
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 0a33b03..3d90462 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o crash.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
 obj-$(CONFIG_PM)		+= suspend.o
 obj-$(CONFIG_SOFTWARE_SUSPEND)	+= suspend_asm.o
-obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
 obj-$(CONFIG_IOMMU)		+= pci-gart.o aperture.o
 obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary.o tce.o
 obj-$(CONFIG_SWIOTLB)		+= pci-swiotlb.o
diff --git a/arch/x86_64/kernel/cpufreq/Makefile b/arch/x86_64/kernel/cpufreq/Makefile
deleted file mode 100644
index 753ce1d..0000000
--- a/arch/x86_64/kernel/cpufreq/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Reuse the i386 cpufreq drivers
-#
-
-SRCDIR := ../../../i386/kernel/cpu/cpufreq
-
-obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o
-obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
-obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o
-obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o
-obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o
-
-powernow-k8-objs := ${SRCDIR}/powernow-k8.o
-speedstep-centrino-objs := ${SRCDIR}/speedstep-centrino.o
-acpi-cpufreq-objs := ${SRCDIR}/acpi-cpufreq.o
-p4-clockmod-objs := ${SRCDIR}/p4-clockmod.o
-speedstep-lib-objs := ${SRCDIR}/speedstep-lib.o
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h b/include/asm-x86/speedstep-lib.h
similarity index 100%
rename from arch/i386/kernel/cpu/cpufreq/speedstep-lib.h
rename to include/asm-x86/speedstep-lib.h

--

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

* [PATCH take3 16/20] acpi files switched
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (14 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 15/20] cpufreq files switched Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  6:36   ` Len Brown
  2007-03-15  5:13 ` [PATCH take3 17/20] k8.c switch Steven Rostedt
                   ` (5 subsequent siblings)
  21 siblings, 1 reply; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 17-acpi.patch --]
[-- Type: text/plain, Size: 2338 bytes --]

Moved the shared files that were in arch/i386/kernel/acpi to the common
area.

Note, there still exists files in both archs in acpi. Since there's code
there that is unique to the arch.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile
index 7f7be01..3de22c2 100644
--- a/arch/i386/kernel/acpi/Makefile
+++ b/arch/i386/kernel/acpi/Makefile
@@ -1,10 +1,5 @@
-obj-$(CONFIG_ACPI)		+= boot.o
 ifneq ($(CONFIG_PCI),)
 obj-$(CONFIG_X86_IO_APIC)	+= earlyquirk.o
 endif
 obj-$(CONFIG_ACPI_SLEEP)	+= sleep.o wakeup.o
 
-ifneq ($(CONFIG_ACPI_PROCESSOR),)
-obj-y				+= cstate.o processor.o
-endif
-
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index c1a2b58..1167962 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,6 +1,7 @@
 obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
 obj-y				+= cpu/
+obj-$(CONFIG_ACPI)		+= acpi/
 
 obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
diff --git a/arch/x86/kernel/acpi/Makefile b/arch/x86/kernel/acpi/Makefile
new file mode 100644
index 0000000..3aa3d16
--- /dev/null
+++ b/arch/x86/kernel/acpi/Makefile
@@ -0,0 +1,5 @@
+obj-y				+= boot.o
+
+ifneq ($(CONFIG_ACPI_PROCESSOR),)
+obj-y		+= processor.o cstate.o
+endif
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
similarity index 100%
rename from arch/i386/kernel/acpi/boot.c
rename to arch/x86/kernel/acpi/boot.c
diff --git a/arch/i386/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
similarity index 100%
rename from arch/i386/kernel/acpi/cstate.c
rename to arch/x86/kernel/acpi/cstate.c
diff --git a/arch/i386/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
similarity index 100%
rename from arch/i386/kernel/acpi/processor.c
rename to arch/x86/kernel/acpi/processor.c
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile
index 080b996..eb4bc11 100644
--- a/arch/x86_64/kernel/acpi/Makefile
+++ b/arch/x86_64/kernel/acpi/Makefile
@@ -1,9 +1,2 @@
-obj-y			:= boot.o
-boot-y			:= ../../../i386/kernel/acpi/boot.o
 obj-$(CONFIG_ACPI_SLEEP)	+= sleep.o wakeup.o
 
-ifneq ($(CONFIG_ACPI_PROCESSOR),)
-obj-y			+= processor.o
-processor-y		:= ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o
-endif
-

--

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

* [PATCH take3 17/20] k8.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (15 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 16/20] acpi " Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 18/20] stacktrace.c switch Steven Rostedt
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 18-k8.patch --]
[-- Type: text/plain, Size: 1777 bytes --]

Move the k8.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index ce1f742..72e11f7 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -33,7 +33,6 @@ obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
 obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault.o
 obj-$(CONFIG_VM86)		+= vm86.o
 obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
-obj-$(CONFIG_K8_NB)		+= k8.o
 
 obj-$(CONFIG_VMI)		+= vmi.o vmitime.o
 obj-$(CONFIG_PARAVIRT)		+= paravirt.o
@@ -78,6 +77,5 @@ $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
 			$(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
 	$(call if_changed,syscall)
 
-k8-y                      += ../../x86_64/kernel/k8.o
 stacktrace-y		  += ../../x86_64/kernel/stacktrace.o
 
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 1167962..06c335d 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
+obj-$(CONFIG_K8_NB)		+= k8.o
 
 obj-y				+= pcspeaker.o
 
diff --git a/arch/x86_64/kernel/k8.c b/arch/x86/kernel/k8.c
similarity index 100%
rename from arch/x86_64/kernel/k8.c
rename to arch/x86/kernel/k8.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 3d90462..0510887 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -29,7 +29,6 @@ obj-$(CONFIG_SWIOTLB)		+= pci-swiotlb.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_X86_PM_TIMER)	+= pmtimer.o
 obj-$(CONFIG_X86_VSMP)		+= vsmp.o
-obj-$(CONFIG_K8_NB)		+= k8.o
 obj-$(CONFIG_AUDIT)		+= audit.o
 
 obj-$(CONFIG_MODULES)		+= module.o

--

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

* [PATCH take3 18/20] stacktrace.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (16 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 17/20] k8.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 19/20] hugetlbpage.c switch Steven Rostedt
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 19-stacktrace.patch --]
[-- Type: text/plain, Size: 1706 bytes --]

Move the stacktrace.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 72e11f7..a5cf2e7 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -9,7 +9,6 @@ obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		pci-dma.o i386_ksyms.o i387.o e820.o\
 		i8253.o tsc.o
 
-obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
 obj-y				+= acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
@@ -77,5 +76,3 @@ $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
 			$(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
 	$(call if_changed,syscall)
 
-stacktrace-y		  += ../../x86_64/kernel/stacktrace.o
-
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 06c335d..297cde9 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -1,5 +1,7 @@
 obj-y				+= bootflag.o quirks.o i8237.o topology.o alternative.o
 
+obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
+
 obj-y				+= cpu/
 obj-$(CONFIG_ACPI)		+= acpi/
 
diff --git a/arch/x86_64/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
similarity index 100%
rename from arch/x86_64/kernel/stacktrace.c
rename to arch/x86/kernel/stacktrace.c
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 0510887..7477cb1 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -10,7 +10,6 @@ obj-y	:= process.o signal.o entry.o traps.o irq.o \
 		setup64.o e820.o reboot.o \
 		pci-dma.o pci-nommu.o hpet.o tsc.o
 
-obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-$(CONFIG_X86_MCE)		+= mce.o
 obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
 obj-$(CONFIG_X86_MCE_AMD)	+= mce_amd.o

--

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

* [PATCH take3 19/20] hugetlbpage.c switch
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (17 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 18/20] stacktrace.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  5:13 ` [PATCH take3 20/20] oprofile files switched Steven Rostedt
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 20-hugetlbpage.patch --]
[-- Type: text/plain, Size: 2145 bytes --]

Move the hugetlbpage.c to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index d73a830..06dd07e 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -102,6 +102,7 @@ libs-y 					+= arch/i386/lib/
 core-y					+= arch/i386/kernel/ \
 					   arch/x86/kernel/ \
 					   arch/i386/mm/ \
+					   arch/x86/mm/ \
 					   arch/i386/$(mcore-y)/ \
 					   arch/i386/crypto/
 drivers-$(CONFIG_MATH_EMULATION)	+= arch/i386/math-emu/
diff --git a/arch/i386/mm/Makefile b/arch/i386/mm/Makefile
index 80908b5..0cb01e6 100644
--- a/arch/i386/mm/Makefile
+++ b/arch/i386/mm/Makefile
@@ -5,6 +5,5 @@
 obj-y	:= init.o pgtable.o fault.o ioremap.o extable.o pageattr.o mmap.o
 
 obj-$(CONFIG_NUMA) += discontig.o
-obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_HIGHMEM) += highmem.o
 obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap.o
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
new file mode 100644
index 0000000..1b6e922
--- /dev/null
+++ b/arch/x86/mm/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
similarity index 100%
rename from arch/i386/mm/hugetlbpage.c
rename to arch/x86/mm/hugetlbpage.c
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 3cf9198..abf1829 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -81,6 +81,7 @@ libs-y 					+= arch/x86_64/lib/
 core-y					+= arch/x86_64/kernel/ \
 					   arch/x86/kernel/ \
 					   arch/x86_64/mm/ \
+					   arch/x86/mm/ \
 					   arch/x86_64/crypto/
 core-$(CONFIG_IA32_EMULATION)		+= arch/x86_64/ia32/
 drivers-$(CONFIG_PCI)			+= arch/x86_64/pci/
diff --git a/arch/x86_64/mm/Makefile b/arch/x86_64/mm/Makefile
index d25ac86..b6f1f43 100644
--- a/arch/x86_64/mm/Makefile
+++ b/arch/x86_64/mm/Makefile
@@ -3,9 +3,7 @@
 #
 
 obj-y	 := init.o fault.o ioremap.o extable.o pageattr.o mmap.o
-obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_NUMA) += numa.o
 obj-$(CONFIG_K8_NUMA) += k8topology.o
 obj-$(CONFIG_ACPI_NUMA) += srat.o
 
-hugetlbpage-y = ../../i386/mm/hugetlbpage.o

--

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

* [PATCH take3 20/20] oprofile files switched
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (18 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 19/20] hugetlbpage.c switch Steven Rostedt
@ 2007-03-15  5:13 ` Steven Rostedt
  2007-03-15  6:37 ` [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Rusty Russell
  2007-03-16 10:29 ` Ingo Molnar
  21 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15  5:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge

[-- Attachment #1: 21-oprofile.patch --]
[-- Type: text/plain, Size: 5210 bytes --]

Move the oprofile files from arch/i386/oprofile to the common area.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 53d6237..137c063 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -1226,7 +1226,7 @@ source "fs/Kconfig"
 menu "Instrumentation Support"
 	depends on EXPERIMENTAL
 
-source "arch/i386/oprofile/Kconfig"
+source "arch/x86/oprofile/Kconfig"
 
 config KPROBES
 	bool "Kprobes (EXPERIMENTAL)"
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 06dd07e..6e537be 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -108,7 +108,7 @@ core-y					+= arch/i386/kernel/ \
 drivers-$(CONFIG_MATH_EMULATION)	+= arch/i386/math-emu/
 drivers-$(CONFIG_PCI)			+= arch/i386/pci/
 # must be linked after kernel/
-drivers-$(CONFIG_OPROFILE)		+= arch/i386/oprofile/
+drivers-$(CONFIG_OPROFILE)		+= arch/x86/oprofile/
 drivers-$(CONFIG_PM)			+= arch/i386/power/
 
 CFLAGS += $(mflags-y)
diff --git a/arch/i386/oprofile/Kconfig b/arch/x86/oprofile/Kconfig
similarity index 100%
rename from arch/i386/oprofile/Kconfig
rename to arch/x86/oprofile/Kconfig
diff --git a/arch/i386/oprofile/Makefile b/arch/x86/oprofile/Makefile
similarity index 100%
rename from arch/i386/oprofile/Makefile
rename to arch/x86/oprofile/Makefile
diff --git a/arch/i386/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
similarity index 100%
rename from arch/i386/oprofile/backtrace.c
rename to arch/x86/oprofile/backtrace.c
diff --git a/arch/i386/oprofile/init.c b/arch/x86/oprofile/init.c
similarity index 100%
rename from arch/i386/oprofile/init.c
rename to arch/x86/oprofile/init.c
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
similarity index 100%
rename from arch/i386/oprofile/nmi_int.c
rename to arch/x86/oprofile/nmi_int.c
diff --git a/arch/i386/oprofile/nmi_timer_int.c b/arch/x86/oprofile/nmi_timer_int.c
similarity index 100%
rename from arch/i386/oprofile/nmi_timer_int.c
rename to arch/x86/oprofile/nmi_timer_int.c
diff --git a/arch/i386/oprofile/op_counter.h b/arch/x86/oprofile/op_counter.h
similarity index 100%
rename from arch/i386/oprofile/op_counter.h
rename to arch/x86/oprofile/op_counter.h
diff --git a/arch/i386/oprofile/op_model_athlon.c b/arch/x86/oprofile/op_model_athlon.c
similarity index 100%
rename from arch/i386/oprofile/op_model_athlon.c
rename to arch/x86/oprofile/op_model_athlon.c
diff --git a/arch/i386/oprofile/op_model_p4.c b/arch/x86/oprofile/op_model_p4.c
similarity index 100%
rename from arch/i386/oprofile/op_model_p4.c
rename to arch/x86/oprofile/op_model_p4.c
diff --git a/arch/i386/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
similarity index 100%
rename from arch/i386/oprofile/op_model_ppro.c
rename to arch/x86/oprofile/op_model_ppro.c
diff --git a/arch/i386/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h
similarity index 100%
rename from arch/i386/oprofile/op_x86_model.h
rename to arch/x86/oprofile/op_x86_model.h
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 56eb14c..12e9fc4 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -738,7 +738,7 @@ source fs/Kconfig
 menu "Instrumentation Support"
         depends on EXPERIMENTAL
 
-source "arch/x86_64/oprofile/Kconfig"
+source "arch/x86/oprofile/Kconfig"
 
 config KPROBES
 	bool "Kprobes (EXPERIMENTAL)"
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index abf1829..0c7e0fa 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -85,7 +85,7 @@ core-y					+= arch/x86_64/kernel/ \
 					   arch/x86_64/crypto/
 core-$(CONFIG_IA32_EMULATION)		+= arch/x86_64/ia32/
 drivers-$(CONFIG_PCI)			+= arch/x86_64/pci/
-drivers-$(CONFIG_OPROFILE)		+= arch/x86_64/oprofile/
+drivers-$(CONFIG_OPROFILE)		+= arch/x86/oprofile/
 
 boot := arch/x86_64/boot
 
diff --git a/arch/x86_64/oprofile/Kconfig b/arch/x86_64/oprofile/Kconfig
deleted file mode 100644
index d8a8408..0000000
--- a/arch/x86_64/oprofile/Kconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-config PROFILING
-	bool "Profiling support (EXPERIMENTAL)"
-	help
-	  Say Y here to enable the extended profiling support mechanisms used
-	  by profilers such as OProfile.
-	  
-
-config OPROFILE
-	tristate "OProfile system profiling (EXPERIMENTAL)"
-	depends on PROFILING
-	help
-	  OProfile is a profiling system capable of profiling the
-	  whole system, include the kernel, kernel modules, libraries,
-	  and applications.
-
-	  If unsure, say N.
-
diff --git a/arch/x86_64/oprofile/Makefile b/arch/x86_64/oprofile/Makefile
deleted file mode 100644
index 6be3268..0000000
--- a/arch/x86_64/oprofile/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# oprofile for x86-64.
-# Just reuse the one from i386. 
-#
-
-obj-$(CONFIG_OPROFILE) += oprofile.o
- 
-DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
-	oprof.o cpu_buffer.o buffer_sync.o \
-	event_buffer.o oprofile_files.o \
-	oprofilefs.o oprofile_stats.o \
-	timer_int.o )
-
-OPROFILE-y := init.o backtrace.o
-OPROFILE-$(CONFIG_X86_LOCAL_APIC) += nmi_int.o op_model_athlon.o op_model_p4.o \
-				     op_model_ppro.o
-OPROFILE-$(CONFIG_X86_IO_APIC)    += nmi_timer_int.o 
-
-oprofile-y = $(DRIVER_OBJS) $(addprefix ../../i386/oprofile/, $(OPROFILE-y))

--

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

* Re: [PATCH take3 16/20] acpi files switched
  2007-03-15  5:13 ` [PATCH take3 16/20] acpi " Steven Rostedt
@ 2007-03-15  6:36   ` Len Brown
  2007-03-15  7:33     ` Chris Wright
  2007-03-15 11:51     ` Steven Rostedt
  0 siblings, 2 replies; 31+ messages in thread
From: Len Brown @ 2007-03-15  6:36 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Linus Torvalds, Andrew Morton, Ingo Molnar,
	Chris Wright, Rusty Russell, Andi Kleen,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

On Thursday 15 March 2007 01:13, Steven Rostedt wrote:
> Moved the shared files that were in arch/i386/kernel/acpi to the common
> area.

When I do a "make cscope" on an i386 or an x86_64 box,
will it find these files in the common area?

thanks
-Len

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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (19 preceding siblings ...)
  2007-03-15  5:13 ` [PATCH take3 20/20] oprofile files switched Steven Rostedt
@ 2007-03-15  6:37 ` Rusty Russell
  2007-03-16 10:13   ` Ingo Molnar
  2007-03-16 10:29 ` Ingo Molnar
  21 siblings, 1 reply; 31+ messages in thread
From: Rusty Russell @ 2007-03-15  6:37 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Linus Torvalds, Andrew Morton, Ingo Molnar,
	Chris Wright, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge, Paul Mackerras, Anton Blanchard

On Thu, 2007-03-15 at 01:13 -0400, Steven Rostedt wrote:
> Once again here's an attempt to put the shared files of x86_64 and i386
> into a separate directory.

OK, that's fine, but the next step is to have "make ARCH=x86" compile,
with a config option as to whether to build 32 or 64 bit.  This will
involve a fair amount of Makefile hair, but if you can get Andi to buy
into that then the rest is a simple matter of code churn.  For most
kernel hackers, this would be the flag day.

Moving the rest of the files across to xxx_32.c, xxx_64.h etc is going
to involve a great deal of untangling and code cleanup.  It's also going
to completely screw a whole heap of my cleanup patches.  Oh well.

(Still hoping for an executive summary from the PPC folks).

Cheers!
Rusty.



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

* Re: [PATCH take3 16/20] acpi files switched
  2007-03-15  6:36   ` Len Brown
@ 2007-03-15  7:33     ` Chris Wright
  2007-03-15 11:51     ` Steven Rostedt
  1 sibling, 0 replies; 31+ messages in thread
From: Chris Wright @ 2007-03-15  7:33 UTC (permalink / raw)
  To: Len Brown
  Cc: Steven Rostedt, linux-kernel, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Chris Wright, Rusty Russell, Andi Kleen,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

* Len Brown (lenb@kernel.org) wrote:
> On Thursday 15 March 2007 01:13, Steven Rostedt wrote:
> > Moved the shared files that were in arch/i386/kernel/acpi to the common
> > area.
> 
> When I do a "make cscope" on an i386 or an x86_64 box,
> will it find these files in the common area?

The simple equiv of 'make ALLSOURCE_ARCHS="$ARCH x86" cscope'
should do it.  I'm sure there's a slicker way, but this
brute force gives you an idea:


--- a/Makefile	Mon Mar 12 11:07:45 2007 -0700
+++ b/Makefile	Thu Mar 15 00:32:25 2007 -0700
@@ -1266,6 +1266,12 @@ ifeq ($(ALLSOURCE_ARCHS),)
 ifeq ($(ALLSOURCE_ARCHS),)
 ifeq ($(ARCH),um)
 ALLINCLUDE_ARCHS := $(ARCH) $(SUBARCH)
+else ifeq ($(ARCH),i386)
+ALLINCLUDE_ARCHS := x86 $(ARCH)
+ALLSOURCE_ARCHS := x86 $(ARCH)
+else ifeq ($(ARCH),x86_64)
+ALLINCLUDE_ARCHS := x86 $(ARCH)
+ALLSOURCE_ARCHS := x86 $(ARCH)
 else
 ALLINCLUDE_ARCHS := $(ARCH)
 endif
@@ -1274,7 +1280,7 @@ ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
 ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
 endif
 
-ALLSOURCE_ARCHS := $(ARCH)
+ALLSOURCE_ARCHS ?= $(ARCH)
 
 define find-sources
         ( find $(__srctree) $(RCS_FIND_IGNORE) \

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

* Re: [PATCH take3 16/20] acpi files switched
  2007-03-15  6:36   ` Len Brown
  2007-03-15  7:33     ` Chris Wright
@ 2007-03-15 11:51     ` Steven Rostedt
  1 sibling, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2007-03-15 11:51 UTC (permalink / raw)
  To: Len Brown
  Cc: linux-kernel, Linus Torvalds, Andrew Morton, Ingo Molnar,
	Chris Wright, Rusty Russell, Andi Kleen,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

On Thu, 2007-03-15 at 02:36 -0400, Len Brown wrote:
> On Thursday 15 March 2007 01:13, Steven Rostedt wrote:
> > Moved the shared files that were in arch/i386/kernel/acpi to the common
> > area.
> 
> When I do a "make cscope" on an i386 or an x86_64 box,
> will it find these files in the common area?

At the moment, "no".

With this quick hack, it will work, and I'm sure someone can come up
with a better idea.

Currently, the "make cscope" and "make TAGS" only get the files that are
physically located in the arch. As I mentioned to Ingo, it took me an
hour when I first looked for early_printk. Since it wasn't in the TAGS
and my own search scripts were also arch specific.  I was working in
i386, and early_printk is not.

But here's a hack that will let both x86_64 and i386 see the same code
in the common area for a "make cscope" or "make TAGS".

-- Steve

diff --git a/Makefile b/Makefile
index 6393738..974c05b 100644
--- a/Makefile
+++ b/Makefile
@@ -1265,8 +1265,16 @@ endif
 
 ifeq ($(ALLSOURCE_ARCHS),)
 ifeq ($(ARCH),um)
+ALLSOURCE_ARCHS := $(ARCH)
 ALLINCLUDE_ARCHS := $(ARCH) $(SUBARCH)
+else ifeq ($(ARCH),x86_64)
+ALLSOURCE_ARCHS := $(ARCH) x86
+ALLINCLUDE_ARCHS := $(ARCH) x86
+else ifeq ($(ARCH),i386)
+ALLSOURCE_ARCHS := $(ARCH) x86
+ALLINCLUDE_ARCHS := $(ARCH) x86
 else
+ALLSOURCE_ARCHS := $(ARCH)
 ALLINCLUDE_ARCHS := $(ARCH)
 endif
 else
@@ -1274,8 +1282,6 @@ else
 ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
 endif
 
-ALLSOURCE_ARCHS := $(ARCH)
-
 define find-sources
         ( find $(__srctree) $(RCS_FIND_IGNORE) \
 	       \( -name include -o -name arch \) -prune -o \



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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-15  6:37 ` [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Rusty Russell
@ 2007-03-16 10:13   ` Ingo Molnar
  0 siblings, 0 replies; 31+ messages in thread
From: Ingo Molnar @ 2007-03-16 10:13 UTC (permalink / raw)
  To: Rusty Russell
  Cc: Steven Rostedt, linux-kernel, Linus Torvalds, Andrew Morton,
	Chris Wright, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge, Paul Mackerras, Anton Blanchard


* Rusty Russell <rusty@rustcorp.com.au> wrote:

> Moving the rest of the files across to xxx_32.c, xxx_64.h etc is going 
> to involve a great deal of untangling and code cleanup.  It's also 
> going to completely screw a whole heap of my cleanup patches.  Oh 
> well.

most of your cleanups ought to be fixable via transforming the file 
names. But yes, and you are not the only one with some significant 
amount of x86 code pending - still, it's the right way to go ;-)

	Ingo

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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
                   ` (20 preceding siblings ...)
  2007-03-15  6:37 ` [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Rusty Russell
@ 2007-03-16 10:29 ` Ingo Molnar
  2007-03-19  1:06   ` Chuck Ebbert
  21 siblings, 1 reply; 31+ messages in thread
From: Ingo Molnar @ 2007-03-16 10:29 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Linus Torvalds, Andrew Morton, Chris Wright,
	Rusty Russell, Andi Kleen, Glauber de Oliveira Costa,
	Jeremy Fitzhardinge


* Steven Rostedt <rostedt@goodmis.org> wrote:

> Once again here's an attempt to put the shared files of x86_64 and 
> i386 into a separate directory.

what do you think about the idea i suggested: to do an x32_/x64_ prefix 
(or _32/_64 postfix), in a brute-force way, _right away_. I.e. do not 
have any overlap of having both arch/i386/ and arch/x86_64/ and 
arch/x86/ - move everything to arch/x86/ right now.

in the initial step we dont even have to attempt to share anything - we 
just want to make sure everything still works fine. Just create a 
'unified' layout with the prefix/postfix solution, and make sure that 
the build architecture can compile existing .configs just fine, which 
results in a functionally identical vmlinux that would be built if these 
files were still in arch/i386/ (and arch/x86_64/).

i dont think we want to have a too long 'overlap' period. Lets just 
unify them, that would be the only large-scale intrusive move.

>From that point on, the unification decisions would be largely per-file: 
"do we want to unify process_32.c and process_64.c into the same file?".

	Ingo

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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-16 10:29 ` Ingo Molnar
@ 2007-03-19  1:06   ` Chuck Ebbert
  2007-03-19 12:17     ` William Lee Irwin III
  0 siblings, 1 reply; 31+ messages in thread
From: Chuck Ebbert @ 2007-03-19  1:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Steven Rostedt, linux-kernel, Linus Torvalds, Andrew Morton,
	Chris Wright, Rusty Russell, Andi Kleen,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

Ingo Molnar wrote:
> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
>> Once again here's an attempt to put the shared files of x86_64 and 
>> i386 into a separate directory.
> 
> what do you think about the idea i suggested: to do an x32_/x64_ prefix 
> (or _32/_64 postfix), in a brute-force way, _right away_. I.e. do not 
> have any overlap of having both arch/i386/ and arch/x86_64/ and 
> arch/x86/ - move everything to arch/x86/ right now.

No, no, please don't do that. It would make backporting patches
for stable kernels a real pain.  Moving only the common files 
is the right way to go for a first cut...


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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-19  1:06   ` Chuck Ebbert
@ 2007-03-19 12:17     ` William Lee Irwin III
  2007-03-19 13:10       ` Chuck Ebbert
  0 siblings, 1 reply; 31+ messages in thread
From: William Lee Irwin III @ 2007-03-19 12:17 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Ingo Molnar, Steven Rostedt, linux-kernel, Linus Torvalds,
	Andrew Morton, Chris Wright, Rusty Russell, Andi Kleen,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

Ingo Molnar wrote:
>> what do you think about the idea i suggested: to do an x32_/x64_ prefix 
>> (or _32/_64 postfix), in a brute-force way, _right away_. I.e. do not 
>> have any overlap of having both arch/i386/ and arch/x86_64/ and 
>> arch/x86/ - move everything to arch/x86/ right now.

On Sun, Mar 18, 2007 at 09:06:10PM -0400, Chuck Ebbert wrote:
> No, no, please don't do that. It would make backporting patches
> for stable kernels a real pain.  Moving only the common files 
> is the right way to go for a first cut...

As if the patches come remotely close to applying in the first place.
The filename patched is the least of the worries.


-- wli

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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-19 12:17     ` William Lee Irwin III
@ 2007-03-19 13:10       ` Chuck Ebbert
  2007-03-19 14:23         ` Andi Kleen
  0 siblings, 1 reply; 31+ messages in thread
From: Chuck Ebbert @ 2007-03-19 13:10 UTC (permalink / raw)
  To: William Lee Irwin III
  Cc: Ingo Molnar, Steven Rostedt, linux-kernel, Linus Torvalds,
	Andrew Morton, Chris Wright, Rusty Russell, Andi Kleen,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

William Lee Irwin III wrote:
> Ingo Molnar wrote:
>>> what do you think about the idea i suggested: to do an x32_/x64_ prefix 
>>> (or _32/_64 postfix), in a brute-force way, _right away_. I.e. do not 
>>> have any overlap of having both arch/i386/ and arch/x86_64/ and 
>>> arch/x86/ - move everything to arch/x86/ right now.
> 
> On Sun, Mar 18, 2007 at 09:06:10PM -0400, Chuck Ebbert wrote:
>> No, no, please don't do that. It would make backporting patches
>> for stable kernels a real pain.  Moving only the common files 
>> is the right way to go for a first cut...
> 
> As if the patches come remotely close to applying in the first place.
> The filename patched is the least of the worries.

Actually it's surprising how many patches do apply unchanged.
A massive file rename, *just for the sake of renaming*, would
mean no x86 patches would apply and gain nothing anyway.


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

* Re: [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3
  2007-03-19 13:10       ` Chuck Ebbert
@ 2007-03-19 14:23         ` Andi Kleen
  0 siblings, 0 replies; 31+ messages in thread
From: Andi Kleen @ 2007-03-19 14:23 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: William Lee Irwin III, Ingo Molnar, Steven Rostedt, linux-kernel,
	Linus Torvalds, Andrew Morton, Chris Wright, Rusty Russell,
	Glauber de Oliveira Costa, Jeremy Fitzhardinge

> and gain nothing anyway.

That's my gripe about the common files directory too.

-Andi

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

end of thread, other threads:[~2007-03-19 14:23 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15  5:13 [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 01/20] early_printk.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 02/20] tsc_sync.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 03/20] bootflag.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 04/20] quirks.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 05/20] i8237.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 06/20] topology.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 07/20] alternative.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 08/20] msr.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 09/20] cpuid.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 10/20] microcode.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 11/20] pcspeaker.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 12/20] mtrr directory switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 13/20] therm_throt.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 14/20] intel_cacheinfo.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 15/20] cpufreq files switched Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 16/20] acpi " Steven Rostedt
2007-03-15  6:36   ` Len Brown
2007-03-15  7:33     ` Chris Wright
2007-03-15 11:51     ` Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 17/20] k8.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 18/20] stacktrace.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 19/20] hugetlbpage.c switch Steven Rostedt
2007-03-15  5:13 ` [PATCH take3 20/20] oprofile files switched Steven Rostedt
2007-03-15  6:37 ` [PATCH take3 00/20] Make common x86 arch area for i386 and x86_64 - Take 3 Rusty Russell
2007-03-16 10:13   ` Ingo Molnar
2007-03-16 10:29 ` Ingo Molnar
2007-03-19  1:06   ` Chuck Ebbert
2007-03-19 12:17     ` William Lee Irwin III
2007-03-19 13:10       ` Chuck Ebbert
2007-03-19 14:23         ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox