aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-12-03 03:11:52 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-04 09:17:21 -0800
commita88b5ba8bd8ac18aad65ee6c6a254e2e74876db3 (patch)
treeeb3d0ffaf53c3f7ec6083752c2097cecd1cb892a /arch/sparc64
parentd670bd4f803c8b646acd20f3ba21e65458293faf (diff)
sparc,sparc64: unify kernel/
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>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/Makefile36
-rw-r--r--arch/sparc64/kernel/asm-offsets.c1
-rw-r--r--arch/sparc64/kernel/audit.c83
-rw-r--r--arch/sparc64/kernel/auxio.c149
-rw-r--r--arch/sparc64/kernel/central.c268
-rw-r--r--arch/sparc64/kernel/cherrs.S579
-rw-r--r--arch/sparc64/kernel/chmc.c863
-rw-r--r--arch/sparc64/kernel/compat_audit.c43
-rw-r--r--arch/sparc64/kernel/cpu.c166
-rw-r--r--arch/sparc64/kernel/ds.c1244
-rw-r--r--arch/sparc64/kernel/dtlb_miss.S39
-rw-r--r--arch/sparc64/kernel/dtlb_prot.S54
-rw-r--r--arch/sparc64/kernel/ebus.c257
-rw-r--r--arch/sparc64/kernel/entry.h195
-rw-r--r--arch/sparc64/kernel/etrap.S236
-rw-r--r--arch/sparc64/kernel/fpu_traps.S384
-rw-r--r--arch/sparc64/kernel/ftrace.c76
-rw-r--r--arch/sparc64/kernel/getsetcc.S24
-rw-r--r--arch/sparc64/kernel/head.S900
-rw-r--r--arch/sparc64/kernel/helpers.S63
-rw-r--r--arch/sparc64/kernel/hvapi.c193
-rw-r--r--arch/sparc64/kernel/hvcalls.S800
-rw-r--r--arch/sparc64/kernel/hvtramp.S140
-rw-r--r--arch/sparc64/kernel/idprom.c49
-rw-r--r--arch/sparc64/kernel/init_task.c35
-rw-r--r--arch/sparc64/kernel/iommu.c866
-rw-r--r--arch/sparc64/kernel/iommu_common.h59
-rw-r--r--arch/sparc64/kernel/irq.c1101
-rw-r--r--arch/sparc64/kernel/itlb_miss.S39
-rw-r--r--arch/sparc64/kernel/ivec.S51
-rw-r--r--arch/sparc64/kernel/kgdb.c186
-rw-r--r--arch/sparc64/kernel/kprobes.c593
-rw-r--r--arch/sparc64/kernel/kstack.h60
-rw-r--r--arch/sparc64/kernel/ktlb.S304
-rw-r--r--arch/sparc64/kernel/ldc.c2378
-rw-r--r--arch/sparc64/kernel/mdesc.c916
-rw-r--r--arch/sparc64/kernel/misctrap.S97
-rw-r--r--arch/sparc64/kernel/module.c213
-rw-r--r--arch/sparc64/kernel/of_device.c898
-rw-r--r--arch/sparc64/kernel/pci.c1095
-rw-r--r--arch/sparc64/kernel/pci_common.c545
-rw-r--r--arch/sparc64/kernel/pci_fire.c521
-rw-r--r--arch/sparc64/kernel/pci_impl.h185
-rw-r--r--arch/sparc64/kernel/pci_msi.c447
-rw-r--r--arch/sparc64/kernel/pci_psycho.c618
-rw-r--r--arch/sparc64/kernel/pci_sabre.c609
-rw-r--r--arch/sparc64/kernel/pci_schizo.c1504
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c1033
-rw-r--r--arch/sparc64/kernel/pci_sun4v.h92
-rw-r--r--arch/sparc64/kernel/pci_sun4v_asm.S362
-rw-r--r--arch/sparc64/kernel/power.c75
-rw-r--r--arch/sparc64/kernel/process.c812
-rw-r--r--arch/sparc64/kernel/prom.c1684
-rw-r--r--arch/sparc64/kernel/psycho_common.c470
-rw-r--r--arch/sparc64/kernel/psycho_common.h48
-rw-r--r--arch/sparc64/kernel/ptrace.c1090
-rw-r--r--arch/sparc64/kernel/reboot.c53
-rw-r--r--arch/sparc64/kernel/rtrap.S450
-rw-r--r--arch/sparc64/kernel/sbus.c674
-rw-r--r--arch/sparc64/kernel/setup.c428
-rw-r--r--arch/sparc64/kernel/signal.c617
-rw-r--r--arch/sparc64/kernel/signal32.c899
-rw-r--r--arch/sparc64/kernel/smp.c1412
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c289
-rw-r--r--arch/sparc64/kernel/spiterrs.S245
-rw-r--r--arch/sparc64/kernel/sstate.c127
-rw-r--r--arch/sparc64/kernel/stacktrace.c64
-rw-r--r--arch/sparc64/kernel/starfire.c116
-rw-r--r--arch/sparc64/kernel/sun4v_ivec.S341
-rw-r--r--arch/sparc64/kernel/sun4v_tlb_miss.S428
-rw-r--r--arch/sparc64/kernel/sys32.S367
-rw-r--r--arch/sparc64/kernel/sys_sparc.c914
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c682
-rw-r--r--arch/sparc64/kernel/syscalls.S279
-rw-r--r--arch/sparc64/kernel/sysfs.c313
-rw-r--r--arch/sparc64/kernel/systbls.S159
-rw-r--r--arch/sparc64/kernel/systbls.h51
-rw-r--r--arch/sparc64/kernel/time.c862
-rw-r--r--arch/sparc64/kernel/trampoline.S417
-rw-r--r--arch/sparc64/kernel/traps.c2600
-rw-r--r--arch/sparc64/kernel/tsb.S552
-rw-r--r--arch/sparc64/kernel/ttable.S266
-rw-r--r--arch/sparc64/kernel/una_asm.S146
-rw-r--r--arch/sparc64/kernel/unaligned.c690
-rw-r--r--arch/sparc64/kernel/us2e_cpufreq.c413
-rw-r--r--arch/sparc64/kernel/us3_cpufreq.c274
-rw-r--r--arch/sparc64/kernel/utrap.S29
-rw-r--r--arch/sparc64/kernel/vio.c451
-rw-r--r--arch/sparc64/kernel/viohs.c822
-rw-r--r--arch/sparc64/kernel/visemul.c890
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S1
-rw-r--r--arch/sparc64/kernel/winfixup.S156
92 files changed, 0 insertions, 43305 deletions
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
deleted file mode 100644
index 416eb9bff48..00000000000
--- a/arch/sparc64/kernel/Makefile
+++ /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
index 8cbd958d50b..00000000000
--- a/arch/sparc64/kernel/asm-offsets.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../sparc/kernel/asm-offsets.c"
diff --git a/arch/sparc64/kernel/audit.c b/arch/sparc64/kernel/audit.c
deleted file mode 100644
index 8fff0ac63d5..00000000000
--- a/arch/sparc64/kernel/audit.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include <linux/init.h>
-#include <linux/types.h>
-#include <linux/audit.h>
-#include <asm/unistd.h>
-
-static unsigned dir_class[] = {
-#include <asm-generic/audit_dir_write.h>
-~0U
-};
-
-static unsigned read_class[] = {
-#include <asm-generic/audit_read.h>
-~0U
-};
-
-static unsigned write_class[] = {
-#include <asm-generic/audit_write.h>
-~0U
-};
-
-static unsigned chattr_class[] = {
-#include <asm-generic/audit_change_attr.h>
-~0U
-};
-
-static unsigned signal_class[] = {
-#include <asm-generic/audit_signal.h>
-~0U
-};
-
-int audit_classify_arch(int arch)
-{
-#ifdef CONFIG_COMPAT
- if (arch == AUDIT_ARCH_SPARC)
- return 1;
-#endif
- return 0;
-}
-
-int audit_classify_syscall(int abi, unsigned syscall)
-{
-#ifdef CONFIG_COMPAT
- extern int sparc32_classify_syscall(unsigned);
- if (abi == AUDIT_ARCH_SPARC)
- return sparc32_classify_syscall(syscall);
-#endif
- switch(syscall) {
- case __NR_open:
- return 2;
- case __NR_openat:
- return 3;
- case __NR_socketcall:
- return 4;
- case __NR_execve:
- return 5;
- default:
- return 0;
- }
-}
-
-static int __init audit_classes_init(void)
-{
-#ifdef CONFIG_COMPAT
- extern __u32 sparc32_dir_class[];
- extern __u32 sparc32_write_class[];
- extern __u32 sparc32_read_class[];
- extern __u32 sparc32_chattr_class[];
- extern __u32 sparc32_signal_class[];
- audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class);
- audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class);
- audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class);
- audit_register_class(AUDIT_CLASS_CHATTR_32, sparc32_chattr_class);
- audit_register_class(AUDIT_CLASS_SIGNAL_32, sparc32_signal_class);
-#endif
- audit_register_class(AUDIT_CLASS_WRITE, write_class);
- audit_register_class(AUDIT_CLASS_READ, read_class);
- audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
- audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
- audit_register_class(AUDIT_CLASS_SIGNAL, signal_class);
- return 0;
-}
-
-__initcall(audit_classes_init);
diff --git a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c
deleted file mode 100644
index 8b67347d422..00000000000
--- a/arch/sparc64/kernel/auxio.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* auxio.c: Probing for the Sparc AUXIO register at boot time.
- *
- * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
- *
- * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net)
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/of_device.h>
-
-#include <asm/prom.h>
-#include <asm/io.h>
-#include <asm/auxio.h>
-
-void __iomem *auxio_register = NULL;
-EXPORT_SYMBOL(auxio_register);
-
-enum auxio_type {
- AUXIO_TYPE_NODEV,
- AUXIO_TYPE_SBUS,
- AUXIO_TYPE_EBUS
-};
-
-static enum auxio_type auxio_devtype = AUXIO_TYPE_NODEV;
-static DEFINE_SPINLOCK(auxio_lock);
-
-static void __auxio_rmw(u8 bits_on, u8 bits_off, int ebus)
-{
- if (auxio_register) {
- unsigned long flags;
- u8 regval, newval;
-
- spin_lock_irqsave(&auxio_lock, flags);
-
- regval = (ebus ?
- (u8) readl(auxio_register) :
- sbus_readb(auxio_register));
- newval = regval | bits_on;
- newval &= ~bits_off;
- if (!ebus)
- newval &= ~AUXIO_AUX1_MASK;
- if (ebus)
- writel((u32) newval, auxio_register);
- else
- sbus_writeb(newval, auxio_register);
-
- spin_unlock_irqrestore(&auxio_lock, flags);
- }
-}
-
-static void __auxio_set_bit(u8 bit, int on, int ebus)
-{
- u8 bits_on = (ebus ? AUXIO_PCIO_LED : AUXIO_AUX1_LED);
- u8 bits_off = 0;
-
- if (!on) {
- u8 tmp = bits_off;
- bits_off = bits_on;
- bits_on = tmp;
- }
- __auxio_rmw(bits_on, bits_off, ebus);
-}
-
-void auxio_set_led(int on)
-{
- int ebus = auxio_devtype == AUXIO_TYPE_EBUS;
- u8 bit;
-
- bit = (ebus ? AUXIO_PCIO_LED : AUXIO_AUX1_LED);
- __auxio_set_bit(bit, on, ebus);
-}
-
-static void __auxio_sbus_set_lte(int on)
-{
- __auxio_set_bit(AUXIO_AUX1_LTE, on, 0);
-}
-
-void auxio_set_lte(int on)
-{
- switch(auxio_devtype) {
- case AUXIO_TYPE_SBUS:
- __auxio_sbus_set_lte(on);
- break;
- case AUXIO_TYPE_EBUS:
- /* FALL-THROUGH */
- default:
- break;
- }
-}
-
-static struct of_device_id __initdata auxio_match[] = {
- {
- .name = "auxio",
- },
- {},
-};
-
-MODULE_DEVICE_TABLE(of, auxio_match);
-
-static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match)
-{
- struct device_node *dp = dev->node;
- unsigned long size;
-
- if (!strcmp(dp->parent->name, "ebus")) {
- auxio_devtype = AUXIO_TYPE_EBUS;
- size = sizeof(u32);
- } else if (!strcmp(dp->parent->name, "sbus")) {
- auxio_devtype = AUXIO_TYPE_SBUS;
- size = 1;
- } else {
- printk("auxio: Unknown parent bus type [%s]\n",
- dp->parent->name);
- return -ENODEV;
- }
- auxio_register = of_ioremap(&dev->resource[0], 0, size, "auxio");
- if (!auxio_register)
- return -ENODEV;
-
- printk(KERN_INFO "AUXIO: Found device at %s\n",
- dp->full_name);
-
- if (auxio_devtype == AUXIO_TYPE_EBUS)
- auxio_set_led(AUXIO_LED_ON);
-
- return 0;
-}
-
-static struct of_platform_driver auxio_driver = {
- .match_table = auxio_match,
- .probe = auxio_probe,
- .driver = {
- .name = "auxio",
- },
-};
-
-static int __init auxio_init(void)
-{
- return of_register_driver(&auxio_driver, &of_platform_bus_type);
-}
-
-/* Must be after subsys_initcall() so that busses are probed. Must
- * be before device_initcall() because things like the floppy driver
- * need to use the AUXIO register.
- */
-fs_initcall(auxio_init);
diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c
deleted file mode 100644
index 05f1c916db0..00000000000
--- a/arch/sparc64/kernel/central.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/* central.c: Central FHC driver for Sunfire/Starfire/Wildfire.
- *
- * Copyright (C) 1997, 1999, 2008 David S. Miller (davem@davemloft.net)
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/string.h>
-#include <linux/init.h>
-#include <linux/of_device.h>
-#include <linux/platform_device.h>
-
-#include <asm/fhc.h>
-#include <asm/upa.h>
-
-struct clock_board {
- void __iomem *clock_freq_regs;
- void __iomem *clock_regs;
- void __iomem *clock_ver_reg;
- int num_slots;
- struct resource leds_resource;
- struct platform_device leds_pdev;
-};
-
-struct fhc {
- void __iomem *pregs;
- bool central;
- bool jtag_master;
- int board_num;
- struct resource leds_resource;
- struct platform_device leds_pdev;
-};
-
-static int __devinit clock_board_calc_nslots(struct clock_board *p)
-{
- u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0;
-
- switch (reg) {
- case 0x40:
- return 16;
-
- case 0xc0:
- return 8;
-
- case 0x80:
- reg = 0;
- if (p->clock_ver_reg)
- reg = upa_readb(p->clock_ver_reg);
- if (reg) {
- if (reg & 0x80)
- return 4;
- else
- return 5;
- }
- /* Fallthrough */
- default:
- return 4;
- }
-}
-
-static int __devinit clock_board_probe(struct of_device *op,
- const struct of_device_id *match)
-{
- struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL);
- int err = -ENOMEM;
-
- if (!p) {
- printk(KERN_ERR "clock_board: Cannot allocate struct clock_board\n");
- goto out;
- }
-
- p->clock_freq_regs = of_ioremap(&op->resource[0], 0,
- resource_size(&op->resource[0]),
- "clock_board_freq");
- if (!p->clock_freq_regs) {
- printk(KERN_ERR "clock_board: Cannot map clock_freq_regs\n");
- goto out_free;
- }
-
- p->clock_regs = of_ioremap(&op->resource[1], 0,
- resource_size(&op->resource[1]),
- "clock_board_regs");
- if (!p->clock_regs) {
- printk(KERN_ERR "clock_board: Cannot map clock_regs\n");
- goto out_unmap_clock_freq_regs;
- }
-
- if (op->resource[2].flags) {
- p->clock_ver_reg = of_ioremap(&op->resource[2], 0,
- resource_size(&op->resource[2]),
- "clock_ver_reg");
- if (!p->clock_ver_reg) {
- printk(KERN_ERR "clock_board: Cannot map clock_ver_reg\n");
- goto out_unmap_clock_regs;
- }
- }
-
- p->num_slots = clock_board_calc_nslots(p);
-
- p->leds_resource.start = (unsig