sparc,sparc64: unify kernel/
Sam Ravnborg [Wed, 3 Dec 2008 11:11:52 +0000 (03:11 -0800)]
o Move all files from sparc64/kernel/ to sparc/kernel
  - rename as appropriate
o Update sparc/Makefile to the changes
o Update sparc/kernel/Makefile to include the sparc64 files

NOTE: This commit changes link order on sparc64!

Link order had to change for either of sparc32 and sparc64.
And assuming sparc64 see more testing than sparc32 change link
order on sparc64 where issues will be caught faster.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

94 files changed:
arch/sparc/Makefile
arch/sparc/kernel/Makefile
arch/sparc/kernel/audit.c [moved from arch/sparc64/kernel/audit.c with 100% similarity]
arch/sparc/kernel/auxio_64.c [moved from arch/sparc64/kernel/auxio.c with 100% similarity]
arch/sparc/kernel/central.c [moved from arch/sparc64/kernel/central.c with 100% similarity]
arch/sparc/kernel/cherrs.S [moved from arch/sparc64/kernel/cherrs.S with 100% similarity]
arch/sparc/kernel/chmc.c [moved from arch/sparc64/kernel/chmc.c with 100% similarity]
arch/sparc/kernel/compat_audit.c [moved from arch/sparc64/kernel/compat_audit.c with 100% similarity]
arch/sparc/kernel/cpu_64.c [moved from arch/sparc64/kernel/cpu.c with 100% similarity]
arch/sparc/kernel/ds.c [moved from arch/sparc64/kernel/ds.c with 100% similarity]
arch/sparc/kernel/dtlb_miss.S [moved from arch/sparc64/kernel/dtlb_miss.S with 100% similarity]
arch/sparc/kernel/dtlb_prot.S [moved from arch/sparc64/kernel/dtlb_prot.S with 100% similarity]
arch/sparc/kernel/ebus.c [moved from arch/sparc64/kernel/ebus.c with 100% similarity]
arch/sparc/kernel/entry.h [moved from arch/sparc64/kernel/entry.h with 100% similarity]
arch/sparc/kernel/etrap_64.S [moved from arch/sparc64/kernel/etrap.S with 100% similarity]
arch/sparc/kernel/fpu_traps.S [moved from arch/sparc64/kernel/fpu_traps.S with 100% similarity]
arch/sparc/kernel/ftrace.c [moved from arch/sparc64/kernel/ftrace.c with 100% similarity]
arch/sparc/kernel/getsetcc.S [moved from arch/sparc64/kernel/getsetcc.S with 100% similarity]
arch/sparc/kernel/head_64.S [moved from arch/sparc64/kernel/head.S with 99% similarity]
arch/sparc/kernel/helpers.S [moved from arch/sparc64/kernel/helpers.S with 100% similarity]
arch/sparc/kernel/hvapi.c [moved from arch/sparc64/kernel/hvapi.c with 100% similarity]
arch/sparc/kernel/hvcalls.S [moved from arch/sparc64/kernel/hvcalls.S with 100% similarity]
arch/sparc/kernel/hvtramp.S [moved from arch/sparc64/kernel/hvtramp.S with 100% similarity]
arch/sparc/kernel/idprom_64.c [moved from arch/sparc64/kernel/idprom.c with 100% similarity]
arch/sparc/kernel/init_task_64.c [moved from arch/sparc64/kernel/init_task.c with 100% similarity]
arch/sparc/kernel/iommu.c [moved from arch/sparc64/kernel/iommu.c with 100% similarity]
arch/sparc/kernel/iommu_common.h [moved from arch/sparc64/kernel/iommu_common.h with 100% similarity]
arch/sparc/kernel/irq_64.c [moved from arch/sparc64/kernel/irq.c with 100% similarity]
arch/sparc/kernel/itlb_miss.S [moved from arch/sparc64/kernel/itlb_miss.S with 100% similarity]
arch/sparc/kernel/ivec.S [moved from arch/sparc64/kernel/ivec.S with 100% similarity]
arch/sparc/kernel/kgdb_64.c [moved from arch/sparc64/kernel/kgdb.c with 100% similarity]
arch/sparc/kernel/kprobes.c [moved from arch/sparc64/kernel/kprobes.c with 100% similarity]
arch/sparc/kernel/kstack.h [moved from arch/sparc64/kernel/kstack.h with 100% similarity]
arch/sparc/kernel/ktlb.S [moved from arch/sparc64/kernel/ktlb.S with 100% similarity]
arch/sparc/kernel/ldc.c [moved from arch/sparc64/kernel/ldc.c with 100% similarity]
arch/sparc/kernel/mdesc.c [moved from arch/sparc64/kernel/mdesc.c with 100% similarity]
arch/sparc/kernel/misctrap.S [moved from arch/sparc64/kernel/misctrap.S with 100% similarity]
arch/sparc/kernel/module_64.c [moved from arch/sparc64/kernel/module.c with 100% similarity]
arch/sparc/kernel/of_device_64.c [moved from arch/sparc64/kernel/of_device.c with 100% similarity]
arch/sparc/kernel/pci.c [moved from arch/sparc64/kernel/pci.c with 100% similarity]
arch/sparc/kernel/pci_common.c [moved from arch/sparc64/kernel/pci_common.c with 100% similarity]
arch/sparc/kernel/pci_fire.c [moved from arch/sparc64/kernel/pci_fire.c with 100% similarity]
arch/sparc/kernel/pci_impl.h [moved from arch/sparc64/kernel/pci_impl.h with 100% similarity]
arch/sparc/kernel/pci_msi.c [moved from arch/sparc64/kernel/pci_msi.c with 100% similarity]
arch/sparc/kernel/pci_psycho.c [moved from arch/sparc64/kernel/pci_psycho.c with 100% similarity]
arch/sparc/kernel/pci_sabre.c [moved from arch/sparc64/kernel/pci_sabre.c with 100% similarity]
arch/sparc/kernel/pci_schizo.c [moved from arch/sparc64/kernel/pci_schizo.c with 100% similarity]
arch/sparc/kernel/pci_sun4v.c [moved from arch/sparc64/kernel/pci_sun4v.c with 100% similarity]
arch/sparc/kernel/pci_sun4v.h [moved from arch/sparc64/kernel/pci_sun4v.h with 100% similarity]
arch/sparc/kernel/pci_sun4v_asm.S [moved from arch/sparc64/kernel/pci_sun4v_asm.S with 100% similarity]
arch/sparc/kernel/power.c [moved from arch/sparc64/kernel/power.c with 100% similarity]
arch/sparc/kernel/process_64.c [moved from arch/sparc64/kernel/process.c with 100% similarity]
arch/sparc/kernel/prom_64.c [moved from arch/sparc64/kernel/prom.c with 100% similarity]
arch/sparc/kernel/psycho_common.c [moved from arch/sparc64/kernel/psycho_common.c with 100% similarity]
arch/sparc/kernel/psycho_common.h [moved from arch/sparc64/kernel/psycho_common.h with 100% similarity]
arch/sparc/kernel/ptrace_64.c [moved from arch/sparc64/kernel/ptrace.c with 100% similarity]
arch/sparc/kernel/reboot.c [moved from arch/sparc64/kernel/reboot.c with 100% similarity]
arch/sparc/kernel/rtrap_64.S [moved from arch/sparc64/kernel/rtrap.S with 100% similarity]
arch/sparc/kernel/sbus.c [moved from arch/sparc64/kernel/sbus.c with 100% similarity]
arch/sparc/kernel/setup_64.c [moved from arch/sparc64/kernel/setup.c with 100% similarity]
arch/sparc/kernel/signal32.c [moved from arch/sparc64/kernel/signal32.c with 100% similarity]
arch/sparc/kernel/signal_64.c [moved from arch/sparc64/kernel/signal.c with 100% similarity]
arch/sparc/kernel/smp_64.c [moved from arch/sparc64/kernel/smp.c with 100% similarity]
arch/sparc/kernel/sparc_ksyms_64.c [moved from arch/sparc64/kernel/sparc64_ksyms.c with 100% similarity]
arch/sparc/kernel/spiterrs.S [moved from arch/sparc64/kernel/spiterrs.S with 100% similarity]
arch/sparc/kernel/sstate.c [moved from arch/sparc64/kernel/sstate.c with 100% similarity]
arch/sparc/kernel/stacktrace.c [moved from arch/sparc64/kernel/stacktrace.c with 100% similarity]
arch/sparc/kernel/starfire.c [moved from arch/sparc64/kernel/starfire.c with 100% similarity]
arch/sparc/kernel/sun4v_ivec.S [moved from arch/sparc64/kernel/sun4v_ivec.S with 100% similarity]
arch/sparc/kernel/sun4v_tlb_miss.S [moved from arch/sparc64/kernel/sun4v_tlb_miss.S with 100% similarity]
arch/sparc/kernel/sys32.S [moved from arch/sparc64/kernel/sys32.S with 100% similarity]
arch/sparc/kernel/sys_sparc32.c [moved from arch/sparc64/kernel/sys_sparc32.c with 100% similarity]
arch/sparc/kernel/sys_sparc_64.c [moved from arch/sparc64/kernel/sys_sparc.c with 100% similarity]
arch/sparc/kernel/syscalls.S [moved from arch/sparc64/kernel/syscalls.S with 100% similarity]
arch/sparc/kernel/sysfs.c [moved from arch/sparc64/kernel/sysfs.c with 100% similarity]
arch/sparc/kernel/systbls.h [moved from arch/sparc64/kernel/systbls.h with 100% similarity]
arch/sparc/kernel/systbls_64.S [moved from arch/sparc64/kernel/systbls.S with 100% similarity]
arch/sparc/kernel/time_64.c [moved from arch/sparc64/kernel/time.c with 100% similarity]
arch/sparc/kernel/trampoline_64.S [moved from arch/sparc64/kernel/trampoline.S with 100% similarity]
arch/sparc/kernel/traps_64.c [moved from arch/sparc64/kernel/traps.c with 100% similarity]
arch/sparc/kernel/tsb.S [moved from arch/sparc64/kernel/tsb.S with 100% similarity]
arch/sparc/kernel/ttable.S [moved from arch/sparc64/kernel/ttable.S with 100% similarity]
arch/sparc/kernel/una_asm_64.S [moved from arch/sparc64/kernel/una_asm.S with 100% similarity]
arch/sparc/kernel/unaligned_64.c [moved from arch/sparc64/kernel/unaligned.c with 100% similarity]
arch/sparc/kernel/us2e_cpufreq.c [moved from arch/sparc64/kernel/us2e_cpufreq.c with 100% similarity]
arch/sparc/kernel/us3_cpufreq.c [moved from arch/sparc64/kernel/us3_cpufreq.c with 100% similarity]
arch/sparc/kernel/utrap.S [moved from arch/sparc64/kernel/utrap.S with 100% similarity]
arch/sparc/kernel/vio.c [moved from arch/sparc64/kernel/vio.c with 100% similarity]
arch/sparc/kernel/viohs.c [moved from arch/sparc64/kernel/viohs.c with 100% similarity]
arch/sparc/kernel/visemul.c [moved from arch/sparc64/kernel/visemul.c with 100% similarity]
arch/sparc/kernel/winfixup.S [moved from arch/sparc64/kernel/winfixup.S with 100% similarity]
arch/sparc64/kernel/Makefile [deleted file]
arch/sparc64/kernel/asm-offsets.c [deleted file]
arch/sparc64/kernel/vmlinux.lds.S [deleted file]

index f061d0a..4b39ac6 100644 (file)
@@ -67,13 +67,10 @@ endif
 
 endif
 
-head-$(CONFIG_SPARC32) := arch/sparc/kernel/head_$(BITS).o
-head-$(CONFIG_SPARC32) += arch/sparc/kernel/init_task_$(BITS).o
-head-$(CONFIG_SPARC64) := arch/sparc64/kernel/head.o
-head-$(CONFIG_SPARC64) += arch/sparc64/kernel/init_task.o
+head-y                 := arch/sparc/kernel/head_$(BITS).o
+head-y                 += arch/sparc/kernel/init_task_$(BITS).o
 
-core-$(CONFIG_SPARC32) += arch/sparc/kernel/
-core-$(CONFIG_SPARC64) += arch/sparc64/kernel/
+core-y                 += arch/sparc/kernel/
 core-y                 += arch/sparc/mm/ arch/sparc/math-emu/
 
 libs-y                 += arch/sparc/prom/
index 6558eea..4643946 100644 (file)
@@ -38,6 +38,19 @@ obj-$(CONFIG_SPARC32)   += muldiv.o
 obj-y                   += prom_$(BITS).o
 obj-y                   += of_device_$(BITS).o
 
+obj-$(CONFIG_SPARC64)   += reboot.o
+obj-$(CONFIG_SPARC64)   += sysfs.o
+obj-$(CONFIG_SPARC64)   += iommu.o
+obj-$(CONFIG_SPARC64)   += central.o
+obj-$(CONFIG_SPARC64)   += starfire.o
+obj-$(CONFIG_SPARC64)   += power.o
+obj-$(CONFIG_SPARC64)   += sbus.o
+obj-$(CONFIG_SPARC64)   += ebus.o
+obj-$(CONFIG_SPARC64)   += visemul.o
+obj-$(CONFIG_SPARC64)   += hvapi.o
+obj-$(CONFIG_SPARC64)   += sstate.o
+obj-$(CONFIG_SPARC64)   += mdesc.o
+
 # sparc32 do not use GENERIC_HARDIRQS but uses the generic devres implementation
 obj-$(CONFIG_SPARC32)     += devres.o
 devres-y                  := ../../../kernel/irq/devres.o
@@ -48,6 +61,7 @@ obj-$(CONFIG_SPARC32_PCI) += pcic.o
 
 obj-$(CONFIG_SMP)         += trampoline_$(BITS).o smp_$(BITS).o
 obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o
+obj-$(CONFIG_SPARC64_SMP) += hvtramp.o
 
 obj-y                     += auxio_$(BITS).o
 obj-$(CONFIG_SUN_PM)      += apc.o pmc.o
@@ -56,3 +70,28 @@ obj-$(CONFIG_MODULES)     += module_$(BITS).o
 obj-$(CONFIG_MODULES)     += sparc_ksyms_$(BITS).o
 obj-$(CONFIG_SPARC_LED)   += led.o
 obj-$(CONFIG_KGDB)        += kgdb_$(BITS).o
+
+
+obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
+CFLAGS_REMOVE_ftrace.o := -pg
+
+obj-$(CONFIG_STACKTRACE)     += stacktrace.o
+# sparc64 PCI
+obj-$(CONFIG_SPARC64_PCI)    += pci.o pci_common.o psycho_common.o
+obj-$(CONFIG_SPARC64_PCI)    += pci_psycho.o pci_sabre.o pci_schizo.o
+obj-$(CONFIG_SPARC64_PCI)    += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
+obj-$(CONFIG_PCI_MSI)        += pci_msi.o
+
+obj-$(CONFIG_COMPAT)         += sys32.o sys_sparc32.o signal32.o
+
+# sparc64 cpufreq
+obj-$(CONFIG_US3_FREQ)  += us3_cpufreq.o
+obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
+obj-$(CONFIG_US3_MC)    += chmc.o
+
+obj-$(CONFIG_KPROBES)   += kprobes.o
+obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
+
+obj-$(CONFIG_AUDIT)     += audit.o
+audit--$(CONFIG_AUDIT)  := compat_audit.o
+obj-$(CONFIG_COMPAT)    += $(audit--y)
similarity index 99%
rename from arch/sparc64/kernel/head.S
rename to arch/sparc/kernel/head_64.S
index 45830c3..8ffee71 100644 (file)
@@ -825,8 +825,8 @@ setup_tba:
         restore
 sparc64_boot_end:
 
-#include "etrap.S"
-#include "rtrap.S"
+#include "etrap_64.S"
+#include "rtrap_64.S"
 #include "winfixup.S"
 #include "fpu_traps.S"
 #include "ivec.S"
@@ -882,7 +882,7 @@ swapper_4m_tsb:
 
 ! 0x0000000000428000
 
-#include "systbls.S"
+#include "systbls_64.S"
 
        .data
        .align  8
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
deleted file mode 100644 (file)
index 416eb9b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-EXTRA_AFLAGS := -ansi
-EXTRA_CFLAGS := -Werror
-
-CFLAGS_REMOVE_ftrace.o = -pg
-
-extra-y                := head.o init_task.o ../../sparc/kernel/vmlinux.lds
-
-obj-y          := process.o setup.o cpu.o idprom.o reboot.o \
-                  traps.o auxio.o una_asm.o sysfs.o iommu.o \
-                  irq.o ptrace.o time.o sys_sparc.o signal.o \
-                  unaligned.o central.o starfire.o \
-                  power.o sbus.o sparc64_ksyms.o ebus.o \
-                  visemul.o prom.o of_device.o hvapi.o sstate.o mdesc.o
-
-obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
-obj-$(CONFIG_STACKTRACE) += stacktrace.o
-obj-$(CONFIG_PCI)       += pci.o pci_common.o psycho_common.o \
-                           pci_psycho.o pci_sabre.o pci_schizo.o \
-                           pci_sun4v.o pci_sun4v_asm.o pci_fire.o
-obj-$(CONFIG_PCI_MSI)  += pci_msi.o
-obj-$(CONFIG_SMP)       += smp.o trampoline.o hvtramp.o
-obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o
-obj-$(CONFIG_MODULES) += module.o
-obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
-obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
-obj-$(CONFIG_US3_MC) += chmc.o
-obj-$(CONFIG_KPROBES) += kprobes.o
-obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
-obj-$(CONFIG_AUDIT) += audit.o
-obj-$(CONFIG_AUDIT)$(CONFIG_COMPAT) += compat_audit.o
-obj-y += $(obj-yy)
-obj-$(CONFIG_KGDB) += kgdb.o
diff --git a/arch/sparc64/kernel/asm-offsets.c b/arch/sparc64/kernel/asm-offsets.c
deleted file mode 100644 (file)
index 8cbd958..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../sparc/kernel/asm-offsets.c"
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
deleted file mode 100644 (file)
index 4e8becb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../sparc/kernel/vmlinux.lds.S"