Make common x86 arch area for i386 and x86_64 - Take 3
cover Make common x86 arch area for i386 and x86_64 - Take 3
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
PATCH 1/20 early_printk.c switch
Move the early_printk.c to the common area.
arch/i386/kernel/Makefile +0 -1
@@ -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
arch/i386/kernel/early_printk.c deleted +0 -2
@@ -1,2 +0,0 @@ - -#include "../../x86_64/kernel/early_printk.c"
arch/x86/kernel/Makefile new file +2 -0
@@ -0,0 +1,2 @@ + +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
arch/x86/kernel/early_printk.c renamed from arch/x86_64/kernel/early_printk.c +0 -0
arch/x86_64/Makefile +1 -0
@@ -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/
arch/x86_64/kernel/Makefile +0 -1
@@ -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
arch/i386/Makefile +1 -0
@@ -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/
--
PATCH 2/20 tsc_sync.c switch
In reply to Steven RostedtMove tsc_sync.c to the common area.
arch/i386/kernel/Makefile +1 -1
@@ -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
arch/i386/kernel/tsc_sync.c deleted +0 -1
@@ -1 +0,0 @@ -#include "../../x86_64/kernel/tsc_sync.c"
arch/x86/kernel/Makefile +5 -0
@@ -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
arch/x86/kernel/tsc_sync.c renamed from arch/x86_64/kernel/tsc_sync.c +0 -0
arch/x86_64/kernel/Makefile +1 -1
@@ -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
--
PATCH 3/20 bootflag.c switch
In reply to Steven RostedtMove the bootflag.c to the common area.
arch/i386/kernel/Makefile +1 -1
@@ -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
arch/x86/kernel/Makefile +1 -0
@@ -1,3 +1,4 @@ +obj-y += bootflag.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
arch/x86/kernel/bootflag.c renamed from arch/i386/kernel/bootflag.c +0 -0
arch/x86_64/kernel/Makefile +1 -2
@@ -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
--
PATCH 4/20 quirks.c switch
In reply to Steven RostedtMove the quirks.c to the common area.
arch/i386/kernel/Makefile +1 -1
@@ -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/
arch/x86/kernel/Makefile +1 -1
@@ -1,4 +1,4 @@ -obj-y += bootflag.o +obj-y += bootflag.o quirks.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
arch/x86/kernel/quirks.c renamed from arch/i386/kernel/quirks.c +0 -0
arch/x86_64/kernel/Makefile +1 -2
@@ -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
--
PATCH 5/20 i8237.c switch
In reply to Steven RostedtMove the i8237.c to the common area.
arch/i386/kernel/Makefile +1 -1
@@ -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/
arch/x86/kernel/Makefile +1 -1
@@ -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
arch/x86/kernel/i8237.c renamed from arch/i386/kernel/i8237.c +0 -0
arch/x86_64/kernel/Makefile +1 -2
@@ -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
--
PATCH 6/20 topology.c switch
In reply to Steven RostedtMove the topology.c to the common area.
arch/i386/kernel/Makefile +1 -1
@@ -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/
arch/x86/kernel/Makefile +1 -1
@@ -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
arch/x86/kernel/topology.c renamed from arch/i386/kernel/topology.c +0 -0
arch/x86_64/kernel/Makefile +0 -2
@@ -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
--
PATCH 7/20 alternative.c switch
In reply to Steven RostedtMove the alternative.c to the common area.
arch/i386/kernel/Makefile +1 -1
@@ -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/
arch/x86/kernel/Makefile +1 -1
@@ -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
arch/x86/kernel/alternative.c renamed from arch/i386/kernel/alternative.c +0 -0
arch/x86_64/kernel/Makefile +1 -2
@@ -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
--
PATCH 8/20 msr.c switch
In reply to Steven RostedtMove the msr.c to the common area.
arch/i386/kernel/Makefile +0 -1
@@ -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
arch/x86/kernel/Makefile +1 -0
@@ -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
arch/x86/kernel/msr.c renamed from arch/i386/kernel/msr.c +0 -0
arch/x86_64/kernel/Makefile +0 -2
@@ -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
--
PATCH 9/20 cpuid.c switch
In reply to Steven RostedtMove the cpuid.c to the common area.
arch/i386/kernel/Makefile +0 -1
@@ -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
arch/x86/kernel/Makefile +1 -0
@@ -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
arch/x86/kernel/cpuid.c renamed from arch/i386/kernel/cpuid.c +0 -0
arch/x86_64/kernel/Makefile +0 -2
@@ -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
--
PATCH 10/20 microcode.c switch
In reply to Steven RostedtMove the microcode.c to the common area.
arch/i386/kernel/Makefile +0 -1
@@ -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
arch/x86/kernel/Makefile +1 -0
@@ -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
arch/x86/kernel/microcode.c renamed from arch/i386/kernel/microcode.c +0 -0
arch/x86_64/kernel/Makefile +0 -2
@@ -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
--
PATCH 11/20 pcspeaker.c switch
In reply to Steven RostedtMove the pcspeaker.c to the common area.
arch/i386/kernel/Makefile +0 -1
@@ -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
arch/x86/kernel/Makefile +2 -0
@@ -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
arch/x86/kernel/pcspeaker.c renamed from arch/i386/kernel/pcspeaker.c +0 -0
arch/x86_64/kernel/Makefile +0 -2
@@ -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
--
PATCH 12/20 mtrr directory switch
In reply to Steven RostedtMove the mtrr directory over to the common area.
arch/i386/kernel/cpu/Makefile +0 -1
@@ -15,5 +15,4 @@ obj-y += umc.o obj-$(CONFIG_X86_MCE) += mcheck/ -obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_CPU_FREQ) += cpufreq/
arch/x86/kernel/Makefile +2 -0
@@ -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
arch/x86/kernel/cpu/Makefile new file +2 -0
@@ -0,0 +1,2 @@ + +obj-$(CONFIG_MTRR) += mtrr/
arch/x86/kernel/cpu/mtrr/Makefile renamed from arch/i386/kernel/cpu/mtrr/Makefile +0 -0
arch/x86/kernel/cpu/mtrr/amd.c renamed from arch/i386/kernel/cpu/mtrr/amd.c +0 -0
arch/x86/kernel/cpu/mtrr/centaur.c renamed from arch/i386/kernel/cpu/mtrr/centaur.c +0 -0
arch/x86/kernel/cpu/mtrr/cyrix.c renamed from arch/i386/kernel/cpu/mtrr/cyrix.c +0 -0
arch/x86/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c +0 -0
arch/x86/kernel/cpu/mtrr/if.c renamed from arch/i386/kernel/cpu/mtrr/if.c +0 -0
arch/x86/kernel/cpu/mtrr/main.c renamed from arch/i386/kernel/cpu/mtrr/main.c +0 -0
arch/x86/kernel/cpu/mtrr/mtrr.h renamed from arch/i386/kernel/cpu/mtrr/mtrr.h +0 -0
arch/x86/kernel/cpu/mtrr/state.c renamed from arch/i386/kernel/cpu/mtrr/state.c +0 -0
arch/x86_64/kernel/Makefile +0 -1
@@ -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
--
PATCH 13/20 therm_throt.c switch
In reply to Steven RostedtMove the therm_throt.c to the common area.
arch/i386/kernel/cpu/mcheck/Makefile +1 -1
@@ -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
arch/x86/kernel/cpu/Makefile +1 -0
@@ -1,2 +1,3 @@ +obj-$(CONFIG_X86_MCE) += mcheck/ obj-$(CONFIG_MTRR) += mtrr/
arch/x86/kernel/cpu/mcheck/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y = therm_throt.o
arch/x86/kernel/cpu/mcheck/therm_throt.c renamed from arch/i386/kernel/cpu/mcheck/therm_throt.c +0 -0
arch/x86_64/kernel/Makefile +1 -2
@@ -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
--
PATCH 14/20 intel_cacheinfo.c switch
In reply to Steven RostedtMove the intel_cacheinfo.c to the common area.
arch/i386/kernel/cpu/Makefile +1 -1
@@ -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
arch/x86/kernel/cpu/Makefile +1 -0
@@ -1,3 +1,4 @@ +obj-y += intel_cacheinfo.o obj-$(CONFIG_X86_MCE) += mcheck/ obj-$(CONFIG_MTRR) += mtrr/
arch/x86/kernel/cpu/intel_cacheinfo.c renamed from arch/i386/kernel/cpu/intel_cacheinfo.c +0 -0
arch/x86_64/kernel/Makefile +0 -3
@@ -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
--
PATCH 15/20 cpufreq files switched
In reply to Steven RostedtMoved 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.
arch/i386/kernel/cpu/cpufreq/Makefile +1 -5
@@ -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
arch/i386/kernel/cpu/cpufreq/speedstep-ich.c +1 -1
@@ -25,7 +25,7 @@#include <linux/pci.h> #include <linux/slab.h> -#include "speedstep-lib.h" +#include <asm-x86/speedstep-lib.h> /* speedstep_chipset:
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +1 -1
@@ -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. *
arch/x86/kernel/cpu/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-y += intel_cacheinfo.o obj-$(CONFIG_X86_MCE) += mcheck/ obj-$(CONFIG_MTRR) += mtrr/ +obj-$(CONFIG_CPU_FREQ) += cpufreq/
arch/x86/kernel/cpu/cpufreq/Makefile new file +6 -0
@@ -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
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c renamed from arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +0 -0
arch/x86/kernel/cpu/cpufreq/p4-clockmod.c renamed from arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +1 -1
@@ -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)
arch/x86/kernel/cpu/cpufreq/powernow-k8.c renamed from arch/i386/kernel/cpu/cpufreq/powernow-k8.c +0 -0
arch/x86/kernel/cpu/cpufreq/powernow-k8.h renamed from arch/i386/kernel/cpu/cpufreq/powernow-k8.h +0 -0
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c renamed from arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +0 -0
arch/x86/kernel/cpu/cpufreq/speedstep-lib.c renamed from arch/i386/kernel/cpu/cpufreq/speedstep-lib.c +1 -1
@@ -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)
arch/x86_64/kernel/Makefile +0 -1
@@ -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
arch/x86_64/kernel/cpufreq/Makefile deleted +0 -17
@@ -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
include/asm-x86/speedstep-lib.h renamed from arch/i386/kernel/cpu/cpufreq/speedstep-lib.h +0 -0
--
PATCH 16/20 acpi files switched
In reply to Steven RostedtMoved 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.
arch/i386/kernel/acpi/Makefile +0 -5
@@ -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 -
arch/x86/kernel/Makefile +1 -0
@@ -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
arch/x86/kernel/acpi/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +obj-y += boot.o + +ifneq ($(CONFIG_ACPI_PROCESSOR),) +obj-y += processor.o cstate.o +endif
arch/x86/kernel/acpi/boot.c renamed from arch/i386/kernel/acpi/boot.c +0 -0
arch/x86/kernel/acpi/cstate.c renamed from arch/i386/kernel/acpi/cstate.c +0 -0
arch/x86/kernel/acpi/processor.c renamed from arch/i386/kernel/acpi/processor.c +0 -0
arch/x86_64/kernel/acpi/Makefile +0 -7
@@ -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 -
--
Len Brown
reviewerRe: [PATCH take3 16/20] acpi files switched
Quoted 2 lines · Steven Rostedt
Moved the shared files that were in
arch/i386/kernel/acpito 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
Re: [PATCH take3 16/20] acpi files switched
Quoted 6 lines · * Len Brown ([email protected]) wrote:
Quoted 2 lines · Steven Rostedt
Moved the shared files that were in
arch/i386/kernel/acpito the common area.When I do a "make cscope" on an i386 or an
x86_64box, 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:
Makefile +7 -1
@@ -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) \
Re: [PATCH take3 16/20] acpi files switched
In reply to Len BrownQuoted 6 lines · Len Brown
Quoted 2 lines · Steven Rostedt
Moved the shared files that were in
arch/i386/kernel/acpito the common area.When I do a "make cscope" on an i386 or an
x86_64box, 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
Makefile +8 -2
@@ -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 \
PATCH 17/20 k8.c switch
In reply to Steven RostedtMove the k8.c to the common area.
arch/i386/kernel/Makefile +0 -2
@@ -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
arch/x86/kernel/Makefile +1 -0
@@ -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
arch/x86/kernel/k8.c renamed from arch/x86_64/kernel/k8.c +0 -0
arch/x86_64/kernel/Makefile +0 -1
@@ -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
--
PATCH 18/20 stacktrace.c switch
In reply to Steven RostedtMove the stacktrace.c to the common area.
arch/i386/kernel/Makefile +0 -3
@@ -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 -
arch/x86/kernel/Makefile +2 -0
@@ -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/
arch/x86/kernel/stacktrace.c renamed from arch/x86_64/kernel/stacktrace.c +0 -0
arch/x86_64/kernel/Makefile +0 -1
@@ -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
--
PATCH 19/20 hugetlbpage.c switch
In reply to Steven RostedtMove the hugetlbpage.c to the common area.
arch/i386/Makefile +1 -0
@@ -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/
arch/i386/mm/Makefile +0 -1
@@ -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
arch/x86/mm/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
arch/x86/mm/hugetlbpage.c renamed from arch/i386/mm/hugetlbpage.c +0 -0
arch/x86_64/Makefile +1 -0
@@ -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/
arch/x86_64/mm/Makefile +0 -2
@@ -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
--
PATCH 20/20 oprofile files switched
In reply to Steven RostedtMove the oprofile files from arch/i386/oprofile to the common area.
arch/i386/Kconfig +1 -1
@@ -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)"
arch/i386/Makefile +1 -1
@@ -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)
arch/x86/oprofile/Kconfig renamed from arch/i386/oprofile/Kconfig +0 -0
arch/x86/oprofile/Makefile renamed from arch/i386/oprofile/Makefile +0 -0
arch/x86/oprofile/backtrace.c renamed from arch/i386/oprofile/backtrace.c +0 -0
arch/x86/oprofile/init.c renamed from arch/i386/oprofile/init.c +0 -0
arch/x86/oprofile/nmi_int.c renamed from arch/i386/oprofile/nmi_int.c +0 -0
arch/x86/oprofile/nmi_timer_int.c renamed from arch/i386/oprofile/nmi_timer_int.c +0 -0
arch/x86/oprofile/op_counter.h renamed from arch/i386/oprofile/op_counter.h +0 -0
arch/x86/oprofile/op_model_athlon.c renamed from arch/i386/oprofile/op_model_athlon.c +0 -0
arch/x86/oprofile/op_model_p4.c renamed from arch/i386/oprofile/op_model_p4.c +0 -0
arch/x86/oprofile/op_model_ppro.c renamed from arch/i386/oprofile/op_model_ppro.c +0 -0
arch/x86/oprofile/op_x86_model.h renamed from arch/i386/oprofile/op_x86_model.h +0 -0
arch/x86_64/Kconfig +1 -1
@@ -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)"
arch/x86_64/Makefile +1 -1
@@ -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
arch/x86_64/oprofile/Kconfig deleted +0 -17
@@ -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. -
arch/x86_64/oprofile/Makefile deleted +0 -19
@@ -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))
--
Quoted 2 lines · Steven Rostedt
Once again here's an attempt to put the shared files of
x86_64and 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.
Quoted 4 lines · Rusty Russell
Moving the rest of the files across to
xxx_32.c,xxx_64.hetc 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
Quoted 2 lines · Steven Rostedt
Once again here's an attempt to put the shared files of
x86_64and 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.
Quoted 1 line
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
Quoted 9 lines · Ingo Molnar
Quoted 2 lines · Steven Rostedt
Once again here's an attempt to put the shared files of
x86_64and 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,
_rightaway_. I.e. do not have any overlap of having botharch/i386/andarch/x86_64/andarch/x86/- move everything toarch/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...
Quoted 4 lines · Ingo Molnar
Quoted 4 lines
what do you think about the idea i suggested: to do an x32_/x64_ prefix (or _32/_64 postfix), in a brute-force way,
_rightaway_. I.e. do not have any overlap of having botharch/i386/andarch/x86_64/andarch/x86/- move everything toarch/x86/right now.
Quoted 3 lines · Chuck Ebbert
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
Quoted 6 lines · William Lee Irwin III
Quoted 4 lines · Ingo Molnar
Quoted 4 lines
what do you think about the idea i suggested: to do an x32_/x64_ prefix (or _32/_64 postfix), in a brute-force way,
_rightaway_. I.e. do not have any overlap of having botharch/i386/andarch/x86_64/andarch/x86/- move everything toarch/x86/right now.
Quoted 7 lines
Quoted 3 lines · Chuck Ebbert
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.
Quoted 1 line
and gain nothing anyway.
That's my gripe about the common files directory too.
-Andi