aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c1
-rw-r--r--arch/sparc64/kernel/cpu.c1
-rw-r--r--arch/sparc64/kernel/devices.c98
-rw-r--r--arch/sparc64/kernel/ebus.c3
-rw-r--r--arch/sparc64/kernel/entry.S1
-rw-r--r--arch/sparc64/kernel/etrap.S1
-rw-r--r--arch/sparc64/kernel/head.S1
-rw-r--r--arch/sparc64/kernel/irq.c1
-rw-r--r--arch/sparc64/kernel/kprobes.c1
-rw-r--r--arch/sparc64/kernel/ktlb.S1
-rw-r--r--arch/sparc64/kernel/of_device.c3
-rw-r--r--arch/sparc64/kernel/pci.c1
-rw-r--r--arch/sparc64/kernel/pci_psycho.c8
-rw-r--r--arch/sparc64/kernel/pci_sabre.c6
-rw-r--r--arch/sparc64/kernel/pci_schizo.c20
-rw-r--r--arch/sparc64/kernel/power.c1
-rw-r--r--arch/sparc64/kernel/process.c2
-rw-r--r--arch/sparc64/kernel/prom.c23
-rw-r--r--arch/sparc64/kernel/rtrap.S1
-rw-r--r--arch/sparc64/kernel/sbus.c6
-rw-r--r--arch/sparc64/kernel/setup.c1
-rw-r--r--arch/sparc64/kernel/signal.c1
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c1
-rw-r--r--arch/sparc64/kernel/sys32.S1
-rw-r--r--arch/sparc64/kernel/sys_sparc.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c1
-rw-r--r--arch/sparc64/kernel/systbls.S1
-rw-r--r--arch/sparc64/kernel/time.c1
-rw-r--r--arch/sparc64/kernel/traps.c1
-rw-r--r--arch/sparc64/kernel/tsb.S1
-rw-r--r--arch/sparc64/kernel/ttable.S1
31 files changed, 47 insertions, 144 deletions
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
index 8a2abcce2737..a98f3ae175a3 100644
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ b/arch/sparc64/kernel/binfmt_elf32.c
@@ -84,7 +84,6 @@ typedef struct {
84 84
85#include <asm/processor.h> 85#include <asm/processor.h>
86#include <linux/module.h> 86#include <linux/module.h>
87#include <linux/config.h>
88#include <linux/elfcore.h> 87#include <linux/elfcore.h>
89#include <linux/compat.h> 88#include <linux/compat.h>
90 89
diff --git a/arch/sparc64/kernel/cpu.c b/arch/sparc64/kernel/cpu.c
index 11cc0caef592..7eb81d3954d9 100644
--- a/arch/sparc64/kernel/cpu.c
+++ b/arch/sparc64/kernel/cpu.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/devices.c b/arch/sparc64/kernel/devices.c
index 389301c95cb2..f8ef2f2b9b37 100644
--- a/arch/sparc64/kernel/devices.c
+++ b/arch/sparc64/kernel/devices.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/threads.h> 8#include <linux/threads.h>
10#include <linux/init.h> 9#include <linux/init.h>
@@ -21,8 +20,6 @@
21#include <asm/spitfire.h> 20#include <asm/spitfire.h>
22#include <asm/timer.h> 21#include <asm/timer.h>
23#include <asm/cpudata.h> 22#include <asm/cpudata.h>
24#include <asm/vdev.h>
25#include <asm/irq.h>
26 23
27/* Used to synchronize acceses to NatSemi SUPER I/O chip configure 24/* Used to synchronize acceses to NatSemi SUPER I/O chip configure
28 * operations in asm/ns87303.h 25 * operations in asm/ns87303.h
@@ -32,100 +29,6 @@ DEFINE_SPINLOCK(ns87303_lock);
32extern void cpu_probe(void); 29extern void cpu_probe(void);
33extern void central_probe(void); 30extern void central_probe(void);
34 31
35u32 sun4v_vdev_devhandle;
36struct device_node *sun4v_vdev_root;
37
38struct vdev_intmap {
39 unsigned int phys;
40 unsigned int irq;
41 unsigned int cnode;
42 unsigned int cinterrupt;
43};
44
45struct vdev_intmask {
46 unsigned int phys;
47 unsigned int interrupt;
48 unsigned int __unused;
49};
50
51static struct vdev_intmap *vdev_intmap;
52static int vdev_num_intmap;
53static struct vdev_intmask *vdev_intmask;
54
55static void __init sun4v_virtual_device_probe(void)
56{
57 struct linux_prom64_registers *regs;
58 struct property *prop;
59 struct device_node *dp;
60 int sz;
61
62 if (tlb_type != hypervisor)
63 return;
64
65 dp = of_find_node_by_name(NULL, "virtual-devices");
66 if (!dp) {
67 prom_printf("SUN4V: Fatal error, no virtual-devices node.\n");
68 prom_halt();
69 }
70
71 sun4v_vdev_root = dp;
72
73 prop = of_find_property(dp, "reg", NULL);
74 regs = prop->value;
75 sun4v_vdev_devhandle = (regs[0].phys_addr >> 32UL) & 0x0fffffff;
76
77 prop = of_find_property(dp, "interrupt-map", &sz);
78 vdev_intmap = prop->value;
79 vdev_num_intmap = sz / sizeof(struct vdev_intmap);
80
81 prop = of_find_property(dp, "interrupt-map-mask", NULL);
82 vdev_intmask = prop->value;
83
84 printk("%s: Virtual Device Bus devhandle[%x]\n",
85 dp->full_name, sun4v_vdev_devhandle);
86}
87
88unsigned int sun4v_vdev_device_interrupt(struct device_node *dev_node)
89{
90 struct property *prop;
91 unsigned int irq, reg;
92 int i;
93
94 prop = of_find_property(dev_node, "interrupts", NULL);
95 if (!prop) {
96 printk("VDEV: Cannot get \"interrupts\" "
97 "property for OBP node %s\n",
98 dev_node->full_name);
99 return 0;
100 }
101 irq = *(unsigned int *) prop->value;
102
103 prop = of_find_property(dev_node, "reg", NULL);
104 if (!prop) {
105 printk("VDEV: Cannot get \"reg\" "
106 "property for OBP node %s\n",
107 dev_node->full_name);
108 return 0;
109 }
110 reg = *(unsigned int *) prop->value;
111
112 for (i = 0; i < vdev_num_intmap; i++) {
113 if (vdev_intmap[i].phys == (reg & vdev_intmask->phys) &&
114 vdev_intmap[i].irq == (irq & vdev_intmask->interrupt)) {
115 irq = vdev_intmap[i].cinterrupt;
116 break;
117 }
118 }
119
120 if (i == vdev_num_intmap) {
121 printk("VDEV: No matching interrupt map entry "
122 "for OBP node %s\n", dev_node->full_name);
123 return 0;
124 }
125
126 return sun4v_build_irq(sun4v_vdev_devhandle, irq);
127}
128
129static const char *cpu_mid_prop(void) 32static const char *cpu_mid_prop(void)
130{ 33{
131 if (tlb_type == spitfire) 34 if (tlb_type == spitfire)
@@ -290,7 +193,6 @@ void __init device_scan(void)
290 } 193 }
291#endif 194#endif
292 195
293 sun4v_virtual_device_probe();
294 central_probe(); 196 central_probe();
295 197
296 cpu_probe(); 198 cpu_probe();
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index aac014d15ad3..8a9b470e1b65 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 5 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/types.h> 10#include <linux/types.h>
@@ -141,7 +140,7 @@ int ebus_dma_irq_enable(struct ebus_dma_info *p, int on)
141 140
142 if (on) { 141 if (on) {
143 if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) { 142 if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) {
144 if (request_irq(p->irq, ebus_dma_irq, SA_SHIRQ, p->name, p)) 143 if (request_irq(p->irq, ebus_dma_irq, IRQF_SHARED, p->name, p))
145 return -EBUSY; 144 return -EBUSY;
146 } 145 }
147 146
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index be85ce2a4ad9..0aaa35fc5a9c 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 7 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12 11
13#include <asm/head.h> 12#include <asm/head.h>
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index 149383835c25..4b2bf9eb447a 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -5,7 +5,6 @@
5 * Copyright (C) 1997, 1998, 1999 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1997, 1998, 1999 Jakub Jelinek (jj@ultra.linux.cz)
6 */ 6 */
7 7
8#include <linux/config.h>
9 8
10#include <asm/asi.h> 9#include <asm/asi.h>
11#include <asm/pstate.h> 10#include <asm/pstate.h>
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 31c5892f5acc..75684b56767e 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx) 7 * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/version.h> 10#include <linux/version.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index eebe02f3f4cb..4e64724cb9ae 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
12#include <linux/ptrace.h> 11#include <linux/ptrace.h>
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c
index 2e1c824c1cc9..8e75ed762fd8 100644
--- a/arch/sparc64/kernel/kprobes.c
+++ b/arch/sparc64/kernel/kprobes.c
@@ -3,7 +3,6 @@
3 * Copyright (C) 2004 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2004 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/kernel.h> 6#include <linux/kernel.h>
8#include <linux/kprobes.h> 7#include <linux/kprobes.h>
9#include <linux/module.h> 8#include <linux/module.h>
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index 31da1e564c95..e492db845ea3 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -6,7 +6,6 @@
6 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 6 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/head.h> 9#include <asm/head.h>
11#include <asm/asi.h> 10#include <asm/asi.h>
12#include <asm/page.h> 11#include <asm/page.h>
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 3670dc8a7d5f..169b017eec0b 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -602,6 +602,9 @@ static void __init build_device_resources(struct of_device *op,
602 build_res: 602 build_res:
603 memset(r, 0, sizeof(*r)); 603 memset(r, 0, sizeof(*r));
604 if (result != OF_BAD_ADDR) { 604 if (result != OF_BAD_ADDR) {
605 if (tlb_type == hypervisor)
606 result &= 0x0fffffffffffffffUL;
607
605 r->start = result; 608 r->start = result;
606 r->end = result + size - 1; 609 r->end = result + size - 1;
607 r->flags = flags; 610 r->flags = flags;
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 04ea6c2eb7a1..e02f01b644af 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/string.h> 11#include <linux/string.h>
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index bf7b32b36705..197a7ffd57ee 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -863,11 +863,11 @@ static void psycho_register_error_handlers(struct pci_controller_info *p)
863 if (op->num_irqs < 6) 863 if (op->num_irqs < 6)
864 return; 864 return;
865 865
866 request_irq(op->irqs[1], psycho_ue_intr, SA_SHIRQ, "PSYCHO UE", p); 866 request_irq(op->irqs[1], psycho_ue_intr, IRQF_SHARED, "PSYCHO UE", p);
867 request_irq(op->irqs[2], psycho_ce_intr, SA_SHIRQ, "PSYCHO CE", p); 867 request_irq(op->irqs[2], psycho_ce_intr, IRQF_SHARED, "PSYCHO CE", p);
868 request_irq(op->irqs[5], psycho_pcierr_intr, SA_SHIRQ, 868 request_irq(op->irqs[5], psycho_pcierr_intr, IRQF_SHARED,
869 "PSYCHO PCIERR-A", &p->pbm_A); 869 "PSYCHO PCIERR-A", &p->pbm_A);
870 request_irq(op->irqs[0], psycho_pcierr_intr, SA_SHIRQ, 870 request_irq(op->irqs[0], psycho_pcierr_intr, IRQF_SHARED,
871 "PSYCHO PCIERR-B", &p->pbm_B); 871 "PSYCHO PCIERR-B", &p->pbm_B);
872 872
873 /* Enable UE and CE interrupts for controller. */ 873 /* Enable UE and CE interrupts for controller. */
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 5e087b0fb4c9..45891850b90d 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -854,14 +854,14 @@ static void sabre_register_error_handlers(struct pci_controller_info *p)
854 SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR | 854 SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR |
855 SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE)); 855 SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE));
856 856
857 request_irq(op->irqs[1], sabre_ue_intr, SA_SHIRQ, "SABRE UE", p); 857 request_irq(op->irqs[1], sabre_ue_intr, IRQF_SHARED, "SABRE UE", p);
858 858
859 sabre_write(base + SABRE_CE_AFSR, 859 sabre_write(base + SABRE_CE_AFSR,
860 (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR | 860 (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR |
861 SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR)); 861 SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR));
862 862
863 request_irq(op->irqs[2], sabre_ce_intr, SA_SHIRQ, "SABRE CE", p); 863 request_irq(op->irqs[2], sabre_ce_intr, IRQF_SHARED, "SABRE CE", p);
864 request_irq(op->irqs[0], sabre_pcierr_intr, SA_SHIRQ, 864 request_irq(op->irqs[0], sabre_pcierr_intr, IRQF_SHARED,
865 "SABRE PCIERR", p); 865 "SABRE PCIERR", p);
866 866
867 tmp = sabre_read(base + SABRE_PCICTRL); 867 tmp = sabre_read(base + SABRE_PCICTRL);
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index 5c6e2a9b91f8..75ade83ecc65 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -998,32 +998,32 @@ static void tomatillo_register_error_handlers(struct pci_controller_info *p)
998 pbm = pbm_for_ino(p, SCHIZO_UE_INO); 998 pbm = pbm_for_ino(p, SCHIZO_UE_INO);
999 op = of_find_device_by_node(pbm->prom_node); 999 op = of_find_device_by_node(pbm->prom_node);
1000 if (op) 1000 if (op)
1001 request_irq(op->irqs[1], schizo_ue_intr, SA_SHIRQ, 1001 request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED,
1002 "TOMATILLO_UE", p); 1002 "TOMATILLO_UE", p);
1003 1003
1004 pbm = pbm_for_ino(p, SCHIZO_CE_INO); 1004 pbm = pbm_for_ino(p, SCHIZO_CE_INO);
1005 op = of_find_device_by_node(pbm->prom_node); 1005 op = of_find_device_by_node(pbm->prom_node);
1006 if (op) 1006 if (op)
1007 request_irq(op->irqs[2], schizo_ce_intr, SA_SHIRQ, 1007 request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED,
1008 "TOMATILLO CE", p); 1008 "TOMATILLO CE", p);
1009 1009
1010 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); 1010 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO);
1011 op = of_find_device_by_node(pbm->prom_node); 1011 op = of_find_device_by_node(pbm->prom_node);
1012 if (op) 1012 if (op)
1013 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1013 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1014 "TOMATILLO PCIERR-A", pbm); 1014 "TOMATILLO PCIERR-A", pbm);
1015 1015
1016 1016
1017 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); 1017 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO);
1018 op = of_find_device_by_node(pbm->prom_node); 1018 op = of_find_device_by_node(pbm->prom_node);
1019 if (op) 1019 if (op)
1020 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1020 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1021 "TOMATILLO PCIERR-B", pbm); 1021 "TOMATILLO PCIERR-B", pbm);
1022 1022
1023 pbm = pbm_for_ino(p, SCHIZO_SERR_INO); 1023 pbm = pbm_for_ino(p, SCHIZO_SERR_INO);
1024 op = of_find_device_by_node(pbm->prom_node); 1024 op = of_find_device_by_node(pbm->prom_node);
1025 if (op) 1025 if (op)
1026 request_irq(op->irqs[3], schizo_safarierr_intr, SA_SHIRQ, 1026 request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED,
1027 "TOMATILLO SERR", p); 1027 "TOMATILLO SERR", p);
1028 1028
1029 /* Enable UE and CE interrupts for controller. */ 1029 /* Enable UE and CE interrupts for controller. */
@@ -1106,32 +1106,32 @@ static void schizo_register_error_handlers(struct pci_controller_info *p)
1106 pbm = pbm_for_ino(p, SCHIZO_UE_INO); 1106 pbm = pbm_for_ino(p, SCHIZO_UE_INO);
1107 op = of_find_device_by_node(pbm->prom_node); 1107 op = of_find_device_by_node(pbm->prom_node);
1108 if (op) 1108 if (op)
1109 request_irq(op->irqs[1], schizo_ue_intr, SA_SHIRQ, 1109 request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED,
1110 "SCHIZO_UE", p); 1110 "SCHIZO_UE", p);
1111 1111
1112 pbm = pbm_for_ino(p, SCHIZO_CE_INO); 1112 pbm = pbm_for_ino(p, SCHIZO_CE_INO);
1113 op = of_find_device_by_node(pbm->prom_node); 1113 op = of_find_device_by_node(pbm->prom_node);
1114 if (op) 1114 if (op)
1115 request_irq(op->irqs[2], schizo_ce_intr, SA_SHIRQ, 1115 request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED,
1116 "SCHIZO CE", p); 1116 "SCHIZO CE", p);
1117 1117
1118 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); 1118 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO);
1119 op = of_find_device_by_node(pbm->prom_node); 1119 op = of_find_device_by_node(pbm->prom_node);
1120 if (op) 1120 if (op)
1121 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1121 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1122 "SCHIZO PCIERR-A", pbm); 1122 "SCHIZO PCIERR-A", pbm);
1123 1123
1124 1124
1125 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); 1125 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO);
1126 op = of_find_device_by_node(pbm->prom_node); 1126 op = of_find_device_by_node(pbm->prom_node);
1127 if (op) 1127 if (op)
1128 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1128 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1129 "SCHIZO PCIERR-B", pbm); 1129 "SCHIZO PCIERR-B", pbm);
1130 1130
1131 pbm = pbm_for_ino(p, SCHIZO_SERR_INO); 1131 pbm = pbm_for_ino(p, SCHIZO_SERR_INO);
1132 op = of_find_device_by_node(pbm->prom_node); 1132 op = of_find_device_by_node(pbm->prom_node);
1133 if (op) 1133 if (op)
1134 request_irq(op->irqs[3], schizo_safarierr_intr, SA_SHIRQ, 1134 request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED,
1135 "SCHIZO SERR", p); 1135 "SCHIZO SERR", p);
1136 1136
1137 /* Enable UE and CE interrupts for controller. */ 1137 /* Enable UE and CE interrupts for controller. */
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 4febeda958a3..e55466c77b61 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -6,7 +6,6 @@
6 6
7#define __KERNEL_SYSCALLS__ 7#define __KERNEL_SYSCALLS__
8 8
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 1c7ca2f712d9..7d75cd4eb297 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -12,7 +12,6 @@
12 12
13#include <stdarg.h> 13#include <stdarg.h>
14 14
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
@@ -26,7 +25,6 @@
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/user.h> 26#include <linux/user.h>
28#include <linux/a.out.h> 27#include <linux/a.out.h>
29#include <linux/config.h>
30#include <linux/reboot.h> 28#include <linux/reboot.h>
31#include <linux/delay.h> 29#include <linux/delay.h>
32#include <linux/compat.h> 30#include <linux/compat.h>
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 8a70c52c0447..fa484d4f241e 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1008,6 +1008,27 @@ static struct irq_trans pci_irq_trans_table[] = {
1008}; 1008};
1009#endif 1009#endif
1010 1010
1011static unsigned int sun4v_vdev_irq_build(struct device_node *dp,
1012 unsigned int devino,
1013 void *_data)
1014{
1015 u32 devhandle = (u32) (unsigned long) _data;
1016
1017 return sun4v_build_irq(devhandle, devino);
1018}
1019
1020static void sun4v_vdev_irq_trans_init(struct device_node *dp)
1021{
1022 struct linux_prom64_registers *regs;
1023
1024 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
1025 dp->irq_trans->irq_build = sun4v_vdev_irq_build;
1026
1027 regs = of_get_property(dp, "reg", NULL);
1028 dp->irq_trans->data = (void *) (unsigned long)
1029 ((regs->phys_addr >> 32UL) & 0x0fffffff);
1030}
1031
1011static void irq_trans_init(struct device_node *dp) 1032static void irq_trans_init(struct device_node *dp)
1012{ 1033{
1013 const char *model; 1034 const char *model;
@@ -1034,6 +1055,8 @@ static void irq_trans_init(struct device_node *dp)
1034#endif 1055#endif
1035 if (!strcmp(dp->name, "central")) 1056 if (!strcmp(dp->name, "central"))
1036 return central_irq_trans_init(dp->child); 1057 return central_irq_trans_init(dp->child);
1058 if (!strcmp(dp->name, "virtual-devices"))
1059 return sun4v_vdev_irq_trans_init(dp);
1037} 1060}
1038 1061
1039static int is_root_node(const struct device_node *dp) 1062static int is_root_node(const struct device_node *dp)
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index 7130e866f935..3522cd66f3bb 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -5,7 +5,6 @@
5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
6 */ 6 */
7 7
8#include <linux/config.h>
9 8
10#include <asm/asi.h> 9#include <asm/asi.h>
11#include <asm/pstate.h> 10#include <asm/pstate.h>
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index ef68aa4fec65..c49a57795743 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1065,7 +1065,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1065 1065
1066 irq = sbus_build_irq(sbus, SYSIO_UE_INO); 1066 irq = sbus_build_irq(sbus, SYSIO_UE_INO);
1067 if (request_irq(irq, sysio_ue_handler, 1067 if (request_irq(irq, sysio_ue_handler,
1068 SA_SHIRQ, "SYSIO UE", sbus) < 0) { 1068 IRQF_SHARED, "SYSIO UE", sbus) < 0) {
1069 prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n", 1069 prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n",
1070 sbus->portid); 1070 sbus->portid);
1071 prom_halt(); 1071 prom_halt();
@@ -1073,7 +1073,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1073 1073
1074 irq = sbus_build_irq(sbus, SYSIO_CE_INO); 1074 irq = sbus_build_irq(sbus, SYSIO_CE_INO);
1075 if (request_irq(irq, sysio_ce_handler, 1075 if (request_irq(irq, sysio_ce_handler,
1076 SA_SHIRQ, "SYSIO CE", sbus) < 0) { 1076 IRQF_SHARED, "SYSIO CE", sbus) < 0) {
1077 prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n", 1077 prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n",
1078 sbus->portid); 1078 sbus->portid);
1079 prom_halt(); 1079 prom_halt();
@@ -1081,7 +1081,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1081 1081
1082 irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO); 1082 irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO);
1083 if (request_irq(irq, sysio_sbus_error_handler, 1083 if (request_irq(irq, sysio_sbus_error_handler,
1084 SA_SHIRQ, "SYSIO SBUS Error", sbus) < 0) { 1084 IRQF_SHARED, "SYSIO SBUS Error", sbus) < 0) {
1085 prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n", 1085 prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n",
1086 sbus->portid); 1086 sbus->portid);
1087 prom_halt(); 1087 prom_halt();
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 116d9632002d..a73140466e01 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -18,7 +18,6 @@
18#include <linux/a.out.h> 18#include <linux/a.out.h>
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/config.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
23#include <linux/seq_file.h> 22#include <linux/seq_file.h>
24#include <linux/syscalls.h> 23#include <linux/syscalls.h>
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index ca11a4c457d4..96d56a8410ad 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 8 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
9 */ 9 */
10 10
11#include <linux/config.h>
12#ifdef CONFIG_SPARC32_COMPAT 11#ifdef CONFIG_SPARC32_COMPAT
13#include <linux/compat.h> /* for compat_old_sigset_t */ 12#include <linux/compat.h> /* for compat_old_sigset_t */
14#endif 13#endif
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 4ac35dd2088b..4173de425f09 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -10,7 +10,6 @@
10#define EXPORT_SYMTAB_STROPS 10#define EXPORT_SYMTAB_STROPS
11#define PROMLIB_INTERNAL 11#define PROMLIB_INTERNAL
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/string.h> 15#include <linux/string.h>
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S
index bdf1f4d02e3f..c09ab4b9431d 100644
--- a/arch/sparc64/kernel/sys32.S
+++ b/arch/sparc64/kernel/sys32.S
@@ -6,7 +6,6 @@
6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/errno.h> 9#include <asm/errno.h>
11 10
12/* NOTE: call as jump breaks return stack, we have to avoid that */ 11/* NOTE: call as jump breaks return stack, we have to avoid that */
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 7a869138c37f..51c056df528e 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -6,7 +6,6 @@
6 * platform. 6 * platform.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 31030bf00f1a..c88ae23ce812 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -8,7 +8,6 @@
8 * environment. 8 * environment.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/capability.h> 13#include <linux/capability.h>
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 1136fc465e37..419a63fca172 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -10,7 +10,6 @@
10 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) 10 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
11 */ 11 */
12 12
13#include <linux/config.h>
14 13
15 .text 14 .text
16 .align 4 15 .align 4
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 5f3dd4d800cd..8dcbfbffacc9 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) 9 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 1ff34b019f3f..68420e2dad0e 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -9,7 +9,6 @@
9 * I like traps on v9, :)))) 9 * I like traps on v9, :))))
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/sched.h> /* for jiffies */ 13#include <linux/sched.h> /* for jiffies */
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index a0c8ba58920b..eedf94fa5664 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -3,7 +3,6 @@
3 * Copyright (C) 2006 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/config.h>
7 6
8#include <asm/tsb.h> 7#include <asm/tsb.h>
9#include <asm/hypervisor.h> 8#include <asm/hypervisor.h>
diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S
index ee45ca2d7a04..d7d2a8bdc66e 100644
--- a/arch/sparc64/kernel/ttable.S
+++ b/arch/sparc64/kernel/ttable.S
@@ -3,7 +3,6 @@
3 * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#include <linux/config.h>
7 6
8 .globl sparc64_ttable_tl0, sparc64_ttable_tl1 7 .globl sparc64_ttable_tl0, sparc64_ttable_tl1
9 .globl tl0_icpe, tl1_icpe 8 .globl tl0_icpe, tl1_icpe