aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/atomic.h1
-rw-r--r--include/asm-sparc64/bitops.h1
-rw-r--r--include/asm-sparc64/bugs.h1
-rw-r--r--include/asm-sparc64/cacheflush.h1
-rw-r--r--include/asm-sparc64/cpudata.h19
-rw-r--r--include/asm-sparc64/delay.h1
-rw-r--r--include/asm-sparc64/dma-mapping.h44
-rw-r--r--include/asm-sparc64/dma.h1
-rw-r--r--include/asm-sparc64/ebus.h20
-rw-r--r--include/asm-sparc64/fhc.h7
-rw-r--r--include/asm-sparc64/floppy.h78
-rw-r--r--include/asm-sparc64/hardirq.h2
-rw-r--r--include/asm-sparc64/hw_irq.h2
-rw-r--r--include/asm-sparc64/ide.h1
-rw-r--r--include/asm-sparc64/irq.h97
-rw-r--r--include/asm-sparc64/isa.h21
-rw-r--r--include/asm-sparc64/kdebug.h2
-rw-r--r--include/asm-sparc64/kprobes.h2
-rw-r--r--include/asm-sparc64/mc146818rtc.h1
-rw-r--r--include/asm-sparc64/mmu.h1
-rw-r--r--include/asm-sparc64/of_device.h64
-rw-r--r--include/asm-sparc64/oplib.h6
-rw-r--r--include/asm-sparc64/page.h1
-rw-r--r--include/asm-sparc64/param.h1
-rw-r--r--include/asm-sparc64/parport.h25
-rw-r--r--include/asm-sparc64/pbm.h15
-rw-r--r--include/asm-sparc64/percpu.h2
-rw-r--r--include/asm-sparc64/pgalloc.h1
-rw-r--r--include/asm-sparc64/pgtable.h3
-rw-r--r--include/asm-sparc64/pil.h7
-rw-r--r--include/asm-sparc64/processor.h1
-rw-r--r--include/asm-sparc64/prom.h108
-rw-r--r--include/asm-sparc64/sbus.h29
-rw-r--r--include/asm-sparc64/siginfo.h1
-rw-r--r--include/asm-sparc64/signal.h1
-rw-r--r--include/asm-sparc64/smp.h1
-rw-r--r--include/asm-sparc64/spinlock.h1
-rw-r--r--include/asm-sparc64/system.h1
-rw-r--r--include/asm-sparc64/timer.h1
-rw-r--r--include/asm-sparc64/tlb.h1
-rw-r--r--include/asm-sparc64/tlbflush.h1
-rw-r--r--include/asm-sparc64/ttable.h1
-rw-r--r--include/asm-sparc64/unistd.h4
-rw-r--r--include/asm-sparc64/vdev.h5
-rw-r--r--include/asm-sparc64/vga.h2
45 files changed, 382 insertions, 204 deletions
diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h
index 468eb48d8142..2f0bec26a695 100644
--- a/include/asm-sparc64/atomic.h
+++ b/include/asm-sparc64/atomic.h
@@ -8,7 +8,6 @@
8#ifndef __ARCH_SPARC64_ATOMIC__ 8#ifndef __ARCH_SPARC64_ATOMIC__
9#define __ARCH_SPARC64_ATOMIC__ 9#define __ARCH_SPARC64_ATOMIC__
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13 12
14typedef struct { volatile int counter; } atomic_t; 13typedef struct { volatile int counter; } atomic_t;
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h
index 71944b0f09de..3d5e1af84723 100644
--- a/include/asm-sparc64/bitops.h
+++ b/include/asm-sparc64/bitops.h
@@ -7,7 +7,6 @@
7#ifndef _SPARC64_BITOPS_H 7#ifndef _SPARC64_BITOPS_H
8#define _SPARC64_BITOPS_H 8#define _SPARC64_BITOPS_H
9 9
10#include <linux/config.h>
11#include <linux/compiler.h> 10#include <linux/compiler.h>
12#include <asm/byteorder.h> 11#include <asm/byteorder.h>
13 12
diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h
index 360dd04ed8e4..120422fdb02f 100644
--- a/include/asm-sparc64/bugs.h
+++ b/include/asm-sparc64/bugs.h
@@ -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 7
9extern unsigned long loops_per_jiffy; 8extern unsigned long loops_per_jiffy;
10 9
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h
index b3f61659ba81..745d1ab60371 100644
--- a/include/asm-sparc64/cacheflush.h
+++ b/include/asm-sparc64/cacheflush.h
@@ -1,7 +1,6 @@
1#ifndef _SPARC64_CACHEFLUSH_H 1#ifndef _SPARC64_CACHEFLUSH_H
2#define _SPARC64_CACHEFLUSH_H 2#define _SPARC64_CACHEFLUSH_H
3 3
4#include <linux/config.h>
5#include <asm/page.h> 4#include <asm/page.h>
6 5
7#ifndef __ASSEMBLY__ 6#ifndef __ASSEMBLY__
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h
index 9d6a6dbaf126..f2cc9411b4c7 100644
--- a/include/asm-sparc64/cpudata.h
+++ b/include/asm-sparc64/cpudata.h
@@ -74,8 +74,10 @@ struct trap_per_cpu {
74 unsigned long tsb_huge; 74 unsigned long tsb_huge;
75 unsigned long tsb_huge_temp; 75 unsigned long tsb_huge_temp;
76 76
77/* Dcache line 8: Unused, needed to keep trap_block a power-of-2 in size. */ 77/* Dcache line 8: IRQ work list, and keep trap_block a power-of-2 in size. */
78 unsigned long __pad2[4]; 78 unsigned int irq_worklist;
79 unsigned int __pad1;
80 unsigned long __pad2[3];
79} __attribute__((aligned(64))); 81} __attribute__((aligned(64)));
80extern struct trap_per_cpu trap_block[NR_CPUS]; 82extern struct trap_per_cpu trap_block[NR_CPUS];
81extern void init_cur_cpu_trap(struct thread_info *); 83extern void init_cur_cpu_trap(struct thread_info *);
@@ -119,6 +121,7 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch,
119#define TRAP_PER_CPU_CPU_LIST_PA 0xc8 121#define TRAP_PER_CPU_CPU_LIST_PA 0xc8
120#define TRAP_PER_CPU_TSB_HUGE 0xd0 122#define TRAP_PER_CPU_TSB_HUGE 0xd0
121#define TRAP_PER_CPU_TSB_HUGE_TEMP 0xd8 123#define TRAP_PER_CPU_TSB_HUGE_TEMP 0xd8
124#define TRAP_PER_CPU_IRQ_WORKLIST 0xe0
122 125
123#define TRAP_BLOCK_SZ_SHIFT 8 126#define TRAP_BLOCK_SZ_SHIFT 8
124 127
@@ -171,11 +174,8 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch,
171 174
172/* Clobbers TMP, loads local processor's IRQ work area into DEST. */ 175/* Clobbers TMP, loads local processor's IRQ work area into DEST. */
173#define TRAP_LOAD_IRQ_WORK(DEST, TMP) \ 176#define TRAP_LOAD_IRQ_WORK(DEST, TMP) \
174 __GET_CPUID(TMP) \ 177 TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \
175 sethi %hi(__irq_work), DEST; \ 178 add DEST, TRAP_PER_CPU_IRQ_WORKLIST, DEST;
176 sllx TMP, 6, TMP; \
177 or DEST, %lo(__irq_work), DEST; \
178 add DEST, TMP, DEST;
179 179
180/* Clobbers TMP, loads DEST with current thread info pointer. */ 180/* Clobbers TMP, loads DEST with current thread info pointer. */
181#define TRAP_LOAD_THREAD_REG(DEST, TMP) \ 181#define TRAP_LOAD_THREAD_REG(DEST, TMP) \
@@ -211,9 +211,10 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch,
211 TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \ 211 TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \
212 ldx [DEST + TRAP_PER_CPU_PGD_PADDR], DEST; 212 ldx [DEST + TRAP_PER_CPU_PGD_PADDR], DEST;
213 213
214/* Clobbers TMP, loads local processor's IRQ work area into DEST. */
214#define TRAP_LOAD_IRQ_WORK(DEST, TMP) \ 215#define TRAP_LOAD_IRQ_WORK(DEST, TMP) \
215 sethi %hi(__irq_work), DEST; \ 216 TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \
216 or DEST, %lo(__irq_work), DEST; 217 add DEST, TRAP_PER_CPU_IRQ_WORKLIST, DEST;
217 218
218#define TRAP_LOAD_THREAD_REG(DEST, TMP) \ 219#define TRAP_LOAD_THREAD_REG(DEST, TMP) \
219 TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \ 220 TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \
diff --git a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h
index 2901ea0c342d..a4aae6f80627 100644
--- a/include/asm-sparc64/delay.h
+++ b/include/asm-sparc64/delay.h
@@ -11,7 +11,6 @@
11#ifndef __SPARC64_DELAY_H 11#ifndef __SPARC64_DELAY_H
12#define __SPARC64_DELAY_H 12#define __SPARC64_DELAY_H
13 13
14#include <linux/config.h>
15#include <linux/param.h> 14#include <linux/param.h>
16#include <asm/cpudata.h> 15#include <asm/cpudata.h>
17 16
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h
index a8d39f23d43b..0f5b89c9323b 100644
--- a/include/asm-sparc64/dma-mapping.h
+++ b/include/asm-sparc64/dma-mapping.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_SPARC64_DMA_MAPPING_H 1#ifndef _ASM_SPARC64_DMA_MAPPING_H
2#define _ASM_SPARC64_DMA_MAPPING_H 2#define _ASM_SPARC64_DMA_MAPPING_H
3 3
4#include <linux/config.h>
5 4
6#ifdef CONFIG_PCI 5#ifdef CONFIG_PCI
7 6
@@ -163,4 +162,47 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
163 162
164#endif /* PCI */ 163#endif /* PCI */
165 164
165
166/* Now for the API extensions over the pci_ one */
167
168#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
169#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
170#define dma_is_consistent(d) (1)
171
172static inline int
173dma_get_cache_alignment(void)
174{
175 /* no easy way to get cache size on all processors, so return
176 * the maximum possible, to be safe */
177 return (1 << INTERNODE_CACHE_SHIFT);
178}
179
180static inline void
181dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
182 unsigned long offset, size_t size,
183 enum dma_data_direction direction)
184{
185 /* just sync everything, that's all the pci API can do */
186 dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction);
187}
188
189static inline void
190dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
191 unsigned long offset, size_t size,
192 enum dma_data_direction direction)
193{
194 /* just sync everything, that's all the pci API can do */
195 dma_sync_single_for_device(dev, dma_handle, offset+size, direction);
196}
197
198static inline void
199dma_cache_sync(void *vaddr, size_t size,
200 enum dma_data_direction direction)
201{
202 /* could define this in terms of the dma_cache ... operations,
203 * but if you get this on a platform, you should convert the platform
204 * to using the generic device DMA API */
205 BUG();
206}
207
166#endif /* _ASM_SPARC64_DMA_MAPPING_H */ 208#endif /* _ASM_SPARC64_DMA_MAPPING_H */
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h
index 1aab3c8dce2b..27f65972b3bb 100644
--- a/include/asm-sparc64/dma.h
+++ b/include/asm-sparc64/dma.h
@@ -7,7 +7,6 @@
7#ifndef _ASM_SPARC64_DMA_H 7#ifndef _ASM_SPARC64_DMA_H
8#define _ASM_SPARC64_DMA_H 8#define _ASM_SPARC64_DMA_H
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/spinlock.h> 12#include <linux/spinlock.h>
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h
index 7a408a030f52..a4afe9d5703a 100644
--- a/include/asm-sparc64/ebus.h
+++ b/include/asm-sparc64/ebus.h
@@ -10,13 +10,14 @@
10 10
11#include <asm/pbm.h> 11#include <asm/pbm.h>
12#include <asm/oplib.h> 12#include <asm/oplib.h>
13#include <asm/prom.h>
14#include <asm/of_device.h>
13 15
14struct linux_ebus_child { 16struct linux_ebus_child {
15 struct linux_ebus_child *next; 17 struct linux_ebus_child *next;
16 struct linux_ebus_device *parent; 18 struct linux_ebus_device *parent;
17 struct linux_ebus *bus; 19 struct linux_ebus *bus;
18 int prom_node; 20 struct device_node *prom_node;
19 char prom_name[64];
20 struct resource resource[PROMREG_MAX]; 21 struct resource resource[PROMREG_MAX];
21 int num_addrs; 22 int num_addrs;
22 unsigned int irqs[PROMINTR_MAX]; 23 unsigned int irqs[PROMINTR_MAX];
@@ -24,32 +25,29 @@ struct linux_ebus_child {
24}; 25};
25 26
26struct linux_ebus_device { 27struct linux_ebus_device {
28 struct of_device ofdev;
27 struct linux_ebus_device *next; 29 struct linux_ebus_device *next;
28 struct linux_ebus_child *children; 30 struct linux_ebus_child *children;
29 struct linux_ebus *bus; 31 struct linux_ebus *bus;
30 int prom_node; 32 struct device_node *prom_node;
31 char prom_name[64];
32 struct resource resource[PROMREG_MAX]; 33 struct resource resource[PROMREG_MAX];
33 int num_addrs; 34 int num_addrs;
34 unsigned int irqs[PROMINTR_MAX]; 35 unsigned int irqs[PROMINTR_MAX];
35 int num_irqs; 36 int num_irqs;
36}; 37};
38#define to_ebus_device(d) container_of(d, struct linux_ebus_device, ofdev.dev)
37 39
38struct linux_ebus { 40struct linux_ebus {
41 struct of_device ofdev;
39 struct linux_ebus *next; 42 struct linux_ebus *next;
40 struct linux_ebus_device *devices; 43 struct linux_ebus_device *devices;
41 struct pci_pbm_info *parent; 44 struct pci_pbm_info *parent;
42 struct pci_dev *self; 45 struct pci_dev *self;
43 int index; 46 int index;
44 int is_rio; 47 int is_rio;
45 int prom_node; 48 struct device_node *prom_node;
46 char prom_name[64];
47 struct linux_prom_ebus_ranges ebus_ranges[PROMREG_MAX];
48 int num_ebus_ranges;
49 struct linux_prom_ebus_intmap ebus_intmap[PROMREG_MAX];
50 int num_ebus_intmap;
51 struct linux_prom_ebus_intmask ebus_intmask;
52}; 49};
50#define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev)
53 51
54struct ebus_dma_info { 52struct ebus_dma_info {
55 spinlock_t lock; 53 spinlock_t lock;
diff --git a/include/asm-sparc64/fhc.h b/include/asm-sparc64/fhc.h
index f29eaa254055..9e7f1b0d78b9 100644
--- a/include/asm-sparc64/fhc.h
+++ b/include/asm-sparc64/fhc.h
@@ -10,6 +10,7 @@
10#include <linux/timer.h> 10#include <linux/timer.h>
11 11
12#include <asm/oplib.h> 12#include <asm/oplib.h>
13#include <asm/prom.h>
13#include <asm/upa.h> 14#include <asm/upa.h>
14 15
15struct linux_fhc; 16struct linux_fhc;
@@ -34,8 +35,7 @@ struct linux_central {
34 unsigned long clkregs; 35 unsigned long clkregs;
35 unsigned long clkver; 36 unsigned long clkver;
36 int slots; 37 int slots;
37 int prom_node; 38 struct device_node *prom_node;
38 char prom_name[64];
39 39
40 struct linux_prom_ranges central_ranges[PROMREG_MAX]; 40 struct linux_prom_ranges central_ranges[PROMREG_MAX];
41 int num_central_ranges; 41 int num_central_ranges;
@@ -112,8 +112,7 @@ struct linux_fhc {
112 struct fhc_regs fhc_regs; 112 struct fhc_regs fhc_regs;
113 int board; 113 int board;
114 int jtag_master; 114 int jtag_master;
115 int prom_node; 115 struct device_node *prom_node;
116 char prom_name[64];
117 116
118 struct linux_prom_ranges fhc_ranges[PROMREG_MAX]; 117 struct linux_prom_ranges fhc_ranges[PROMREG_MAX];
119 int num_fhc_ranges; 118 int num_fhc_ranges;
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index 6a95d5d0c576..b591d0e8d8f0 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -10,7 +10,6 @@
10#ifndef __ASM_SPARC64_FLOPPY_H 10#ifndef __ASM_SPARC64_FLOPPY_H
11#define __ASM_SPARC64_FLOPPY_H 11#define __ASM_SPARC64_FLOPPY_H
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
16#include <asm/page.h> 15#include <asm/page.h>
@@ -209,7 +208,55 @@ static void sun_fd_enable_dma(void)
209 pdma_areasize = pdma_size; 208 pdma_areasize = pdma_size;
210} 209}
211 210
212extern irqreturn_t sparc_floppy_irq(int, void *, struct pt_regs *); 211irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs)
212{
213 if (likely(doing_pdma)) {
214 void __iomem *stat = (void __iomem *) fdc_status;
215 unsigned char *vaddr = pdma_vaddr;
216 unsigned long size = pdma_size;
217 u8 val;
218
219 while (size) {
220 val = readb(stat);
221 if (unlikely(!(val & 0x80))) {
222 pdma_vaddr = vaddr;
223 pdma_size = size;
224 return IRQ_HANDLED;
225 }
226 if (unlikely(!(val & 0x20))) {
227 pdma_vaddr = vaddr;
228 pdma_size = size;
229 doing_pdma = 0;
230 goto main_interrupt;
231 }
232 if (val & 0x40) {
233 /* read */
234 *vaddr++ = readb(stat + 1);
235 } else {
236 unsigned char data = *vaddr++;
237
238 /* write */
239 writeb(data, stat + 1);
240 }
241 size--;
242 }
243
244 pdma_vaddr = vaddr;
245 pdma_size = size;
246
247 /* Send Terminal Count pulse to floppy controller. */
248 val = readb(auxio_register);
249 val |= AUXIO_AUX1_FTCNT;
250 writeb(val, auxio_register);
251 val &= ~AUXIO_AUX1_FTCNT;
252 writeb(val, auxio_register);
253
254 doing_pdma = 0;
255 }
256
257main_interrupt:
258 return floppy_interrupt(irq, dev_cookie, regs);
259}
213 260
214static int sun_fd_request_irq(void) 261static int sun_fd_request_irq(void)
215{ 262{
@@ -499,15 +546,14 @@ static int sun_pci_fd_test_drive(unsigned long port, int drive)
499#ifdef CONFIG_PCI 546#ifdef CONFIG_PCI
500static int __init ebus_fdthree_p(struct linux_ebus_device *edev) 547static int __init ebus_fdthree_p(struct linux_ebus_device *edev)
501{ 548{
502 if (!strcmp(edev->prom_name, "fdthree")) 549 if (!strcmp(edev->prom_node->name, "fdthree"))
503 return 1; 550 return 1;
504 if (!strcmp(edev->prom_name, "floppy")) { 551 if (!strcmp(edev->prom_node->name, "floppy")) {
505 char compat[16]; 552 char *compat;
506 prom_getstring(edev->prom_node, 553
507 "compatible", 554 compat = of_get_property(edev->prom_node,
508 compat, sizeof(compat)); 555 "compatible", NULL);
509 compat[15] = '\0'; 556 if (compat && !strcmp(compat, "fdthree"))
510 if (!strcmp(compat, "fdthree"))
511 return 1; 557 return 1;
512 } 558 }
513 return 0; 559 return 0;
@@ -525,12 +571,12 @@ static unsigned long __init isa_floppy_init(void)
525 571
526 for_each_isa(isa_br) { 572 for_each_isa(isa_br) {
527 for_each_isadev(isa_dev, isa_br) { 573 for_each_isadev(isa_dev, isa_br) {
528 if (!strcmp(isa_dev->prom_name, "dma")) { 574 if (!strcmp(isa_dev->prom_node->name, "dma")) {
529 struct sparc_isa_device *child = 575 struct sparc_isa_device *child =
530 isa_dev->child; 576 isa_dev->child;
531 577
532 while (child) { 578 while (child) {
533 if (!strcmp(child->prom_name, 579 if (!strcmp(child->prom_node->name,
534 "floppy")) { 580 "floppy")) {
535 isa_dev = child; 581 isa_dev = child;
536 goto isa_done; 582 goto isa_done;
@@ -615,6 +661,7 @@ static unsigned long __init sun_floppy_init(void)
615 struct linux_ebus_device *edev = NULL; 661 struct linux_ebus_device *edev = NULL;
616 unsigned long config = 0; 662 unsigned long config = 0;
617 void __iomem *auxio_reg; 663 void __iomem *auxio_reg;
664 char *state_prop;
618 665
619 for_each_ebus(ebus) { 666 for_each_ebus(ebus) {
620 for_each_ebusdev(edev, ebus) { 667 for_each_ebusdev(edev, ebus) {
@@ -631,9 +678,8 @@ static unsigned long __init sun_floppy_init(void)
631#endif 678#endif
632 } 679 }
633 680
634 prom_getproperty(edev->prom_node, "status", 681 state_prop = of_get_property(edev->prom_node, "status", NULL);
635 state, sizeof(state)); 682 if (state_prop && !strncmp(state_prop, "disabled", 8))
636 if (!strncmp(state, "disabled", 8))
637 return 0; 683 return 0;
638 684
639 FLOPPY_IRQ = edev->irqs[0]; 685 FLOPPY_IRQ = edev->irqs[0];
@@ -704,7 +750,7 @@ static unsigned long __init sun_floppy_init(void)
704 */ 750 */
705 for_each_ebus(ebus) { 751 for_each_ebus(ebus) {
706 for_each_ebusdev(edev, ebus) { 752 for_each_ebusdev(edev, ebus) {
707 if (!strcmp(edev->prom_name, "ecpp")) { 753 if (!strcmp(edev->prom_node->name, "ecpp")) {
708 config = edev->resource[1].start; 754 config = edev->resource[1].start;
709 goto config_done; 755 goto config_done;
710 } 756 }
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
index f0cf71376ec5..7c29fd1a87aa 100644
--- a/include/asm-sparc64/hardirq.h
+++ b/include/asm-sparc64/hardirq.h
@@ -12,6 +12,8 @@
12#define local_softirq_pending() \ 12#define local_softirq_pending() \
13 (local_cpu_data().__softirq_pending) 13 (local_cpu_data().__softirq_pending)
14 14
15void ack_bad_irq(unsigned int irq);
16
15#define HARDIRQ_BITS 8 17#define HARDIRQ_BITS 8
16 18
17#endif /* !(__SPARC64_HARDIRQ_H) */ 19#endif /* !(__SPARC64_HARDIRQ_H) */
diff --git a/include/asm-sparc64/hw_irq.h b/include/asm-sparc64/hw_irq.h
index 153cae2ddaee..599b3b073450 100644
--- a/include/asm-sparc64/hw_irq.h
+++ b/include/asm-sparc64/hw_irq.h
@@ -1,6 +1,6 @@
1#ifndef __ASM_SPARC64_HW_IRQ_H 1#ifndef __ASM_SPARC64_HW_IRQ_H
2#define __ASM_SPARC64_HW_IRQ_H 2#define __ASM_SPARC64_HW_IRQ_H
3 3
4/* Dummy include. */ 4extern void hw_resend_irq(struct hw_interrupt_type *handler, unsigned int virt_irq);
5 5
6#endif 6#endif
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
index c393f815b0be..55149cf933c2 100644
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -10,7 +10,6 @@
10 10
11#ifdef __KERNEL__ 11#ifdef __KERNEL__
12 12
13#include <linux/config.h>
14#include <asm/pgalloc.h> 13#include <asm/pgalloc.h>
15#include <asm/io.h> 14#include <asm/io.h>
16#include <asm/spitfire.h> 15#include <asm/spitfire.h>
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index de33d6e1afb5..905e59b4a737 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -8,7 +8,6 @@
8#ifndef _SPARC64_IRQ_H 8#ifndef _SPARC64_IRQ_H
9#define _SPARC64_IRQ_H 9#define _SPARC64_IRQ_H
10 10
11#include <linux/config.h>
12#include <linux/linkage.h> 11#include <linux/linkage.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
@@ -16,58 +15,6 @@
16#include <asm/pil.h> 15#include <asm/pil.h>
17#include <asm/ptrace.h> 16#include <asm/ptrace.h>
18 17
19struct ino_bucket;
20
21#define MAX_IRQ_DESC_ACTION 4
22
23struct irq_desc {
24 void (*pre_handler)(struct ino_bucket *, void *, void *);
25 void *pre_handler_arg1;
26 void *pre_handler_arg2;
27 u32 action_active_mask;
28 struct irqaction action[MAX_IRQ_DESC_ACTION];
29};
30
31/* You should not mess with this directly. That's the job of irq.c.
32 *
33 * If you make changes here, please update hand coded assembler of
34 * the vectored interrupt trap handler in entry.S -DaveM
35 *
36 * This is currently one DCACHE line, two buckets per L2 cache
37 * line. Keep this in mind please.
38 */
39struct ino_bucket {
40 /* Next handler in per-CPU PIL worklist. We know that
41 * bucket pointers have the high 32-bits clear, so to
42 * save space we only store the bits we need.
43 */
44/*0x00*/unsigned int irq_chain;
45
46 /* PIL to schedule this IVEC at. */
47/*0x04*/unsigned char pil;
48
49 /* If an IVEC arrives while irq_info is NULL, we
50 * set this to notify request_irq() about the event.
51 */
52/*0x05*/unsigned char pending;
53
54 /* Miscellaneous flags. */
55/*0x06*/unsigned char flags;
56
57 /* Currently unused. */
58/*0x07*/unsigned char __pad;
59
60 /* Reference to IRQ descriptor for this bucket. */
61/*0x08*/struct irq_desc *irq_info;
62
63 /* Sun5 Interrupt Clear Register. */
64/*0x10*/unsigned long iclr;
65
66 /* Sun5 Interrupt Mapping Register. */
67/*0x18*/unsigned long imap;
68
69};
70
71/* IMAP/ICLR register defines */ 18/* IMAP/ICLR register defines */
72#define IMAP_VALID 0x80000000 /* IRQ Enabled */ 19#define IMAP_VALID 0x80000000 /* IRQ Enabled */
73#define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ 20#define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */
@@ -85,36 +32,20 @@ struct ino_bucket {
85#define ICLR_TRANSMIT 0x00000001 /* Transmit state */ 32#define ICLR_TRANSMIT 0x00000001 /* Transmit state */
86#define ICLR_PENDING 0x00000003 /* Pending state */ 33#define ICLR_PENDING 0x00000003 /* Pending state */
87 34
88/* Only 8-bits are available, be careful. -DaveM */ 35/* The largest number of unique interrupt sources we support.
89#define IBF_PCI 0x02 /* PSYCHO/SABRE/SCHIZO PCI interrupt. */ 36 * If this needs to ever be larger than 255, you need to change
90#define IBF_ACTIVE 0x04 /* Interrupt is active and has a handler.*/ 37 * the type of ino_bucket->virt_irq as appropriate.
91#define IBF_INPROGRESS 0x10 /* IRQ is being serviced. */ 38 *
92 39 * ino_bucket->virt_irq allocation is made during {sun4v_,}build_irq().
93#define NUM_IVECS (IMAP_INR + 1) 40 */
94extern struct ino_bucket ivector_table[NUM_IVECS]; 41#define NR_IRQS 255
95
96#define __irq_ino(irq) \
97 (((struct ino_bucket *)(unsigned long)(irq)) - &ivector_table[0])
98#define __irq_pil(irq) ((struct ino_bucket *)(unsigned long)(irq))->pil
99#define __bucket(irq) ((struct ino_bucket *)(unsigned long)(irq))
100#define __irq(bucket) ((unsigned int)(unsigned long)(bucket))
101
102static __inline__ char *__irq_itoa(unsigned int irq)
103{
104 static char buff[16];
105
106 sprintf(buff, "%d,%x", __irq_pil(irq), (unsigned int)__irq_ino(irq));
107 return buff;
108}
109
110#define NR_IRQS 16
111 42
43extern void irq_install_pre_handler(int virt_irq,
44 void (*func)(unsigned int, void *, void *),
45 void *arg1, void *arg2);
112#define irq_canonicalize(irq) (irq) 46#define irq_canonicalize(irq) (irq)
113extern void disable_irq(unsigned int); 47extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap);
114#define disable_irq_nosync disable_irq 48extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino);
115extern void enable_irq(unsigned int);
116extern unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap);
117extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino, int pil, unsigned char flags);
118extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); 49extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);
119 50
120static __inline__ void set_softint(unsigned long bits) 51static __inline__ void set_softint(unsigned long bits)
@@ -140,8 +71,4 @@ static __inline__ unsigned long get_softint(void)
140 return retval; 71 return retval;
141} 72}
142 73
143struct irqaction;
144struct pt_regs;
145int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
146
147#endif 74#endif
diff --git a/include/asm-sparc64/isa.h b/include/asm-sparc64/isa.h
index 4601bbfc3e7b..d9728b9031fc 100644
--- a/include/asm-sparc64/isa.h
+++ b/include/asm-sparc64/isa.h
@@ -9,37 +9,32 @@
9 9
10#include <asm/pbm.h> 10#include <asm/pbm.h>
11#include <asm/oplib.h> 11#include <asm/oplib.h>
12#include <asm/prom.h>
13#include <asm/of_device.h>
12 14
13struct sparc_isa_bridge; 15struct sparc_isa_bridge;
14 16
15struct sparc_isa_device { 17struct sparc_isa_device {
18 struct of_device ofdev;
16 struct sparc_isa_device *next; 19 struct sparc_isa_device *next;
17 struct sparc_isa_device *child; 20 struct sparc_isa_device *child;
18 struct sparc_isa_bridge *bus; 21 struct sparc_isa_bridge *bus;
19 int prom_node; 22 struct device_node *prom_node;
20 char prom_name[64];
21 char compatible[64];
22 struct resource resource; 23 struct resource resource;
23 unsigned int irq; 24 unsigned int irq;
24}; 25};
26#define to_isa_device(d) container_of(d, struct sparc_isa_device, ofdev.dev)
25 27
26struct sparc_isa_bridge { 28struct sparc_isa_bridge {
29 struct of_device ofdev;
27 struct sparc_isa_bridge *next; 30 struct sparc_isa_bridge *next;
28 struct sparc_isa_device *devices; 31 struct sparc_isa_device *devices;
29 struct pci_pbm_info *parent; 32 struct pci_pbm_info *parent;
30 struct pci_dev *self; 33 struct pci_dev *self;
31 int index; 34 int index;
32 int prom_node; 35 struct device_node *prom_node;
33 char prom_name[64];
34#define linux_prom_isa_ranges linux_prom_ebus_ranges
35 struct linux_prom_isa_ranges isa_ranges[PROMREG_MAX];
36 int num_isa_ranges;
37#define linux_prom_isa_intmap linux_prom_ebus_intmap
38 struct linux_prom_isa_intmap isa_intmap[PROMREG_MAX];
39 int num_isa_intmap;
40#define linux_prom_isa_intmask linux_prom_ebus_intmask
41 struct linux_prom_isa_intmap isa_intmask;
42}; 36};
37#define to_isa_bridge(d) container_of(d, struct sparc_isa_bridge, ofdev.dev)
43 38
44extern struct sparc_isa_bridge *isa_chain; 39extern struct sparc_isa_bridge *isa_chain;
45 40
diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h
index 4040d127ac3e..11251bdd00cb 100644
--- a/include/asm-sparc64/kdebug.h
+++ b/include/asm-sparc64/kdebug.h
@@ -17,6 +17,8 @@ struct die_args {
17 17
18extern int register_die_notifier(struct notifier_block *); 18extern int register_die_notifier(struct notifier_block *);
19extern int unregister_die_notifier(struct notifier_block *); 19extern int unregister_die_notifier(struct notifier_block *);
20extern int register_page_fault_notifier(struct notifier_block *);
21extern int unregister_page_fault_notifier(struct notifier_block *);
20extern struct atomic_notifier_head sparc64die_chain; 22extern struct atomic_notifier_head sparc64die_chain;
21 23
22extern void bad_trap(struct pt_regs *, long); 24extern void bad_trap(struct pt_regs *, long);
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h
index e4efe652b54b..15065af566c2 100644
--- a/include/asm-sparc64/kprobes.h
+++ b/include/asm-sparc64/kprobes.h
@@ -1,7 +1,6 @@
1#ifndef _SPARC64_KPROBES_H 1#ifndef _SPARC64_KPROBES_H
2#define _SPARC64_KPROBES_H 2#define _SPARC64_KPROBES_H
3 3
4#include <linux/config.h>
5#include <linux/types.h> 4#include <linux/types.h>
6#include <linux/percpu.h> 5#include <linux/percpu.h>
7 6
@@ -13,6 +12,7 @@ typedef u32 kprobe_opcode_t;
13 12
14#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 13#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
15#define arch_remove_kprobe(p) do {} while (0) 14#define arch_remove_kprobe(p) do {} while (0)
15#define ARCH_INACTIVE_KPROBE_COUNT 0
16 16
17/* Architecture specific copy of original instruction*/ 17/* Architecture specific copy of original instruction*/
18struct arch_specific_insn { 18struct arch_specific_insn {
diff --git a/include/asm-sparc64/mc146818rtc.h b/include/asm-sparc64/mc146818rtc.h
index 75bd572b35fe..e9c0fcc25c6f 100644
--- a/include/asm-sparc64/mc146818rtc.h
+++ b/include/asm-sparc64/mc146818rtc.h
@@ -4,7 +4,6 @@
4#ifndef __ASM_SPARC64_MC146818RTC_H 4#ifndef __ASM_SPARC64_MC146818RTC_H
5#define __ASM_SPARC64_MC146818RTC_H 5#define __ASM_SPARC64_MC146818RTC_H
6 6
7#include <linux/config.h>
8#include <asm/io.h> 7#include <asm/io.h>
9 8
10#ifndef RTC_PORT 9#ifndef RTC_PORT
diff --git a/include/asm-sparc64/mmu.h b/include/asm-sparc64/mmu.h
index 2d4f2ea9568a..70af4b6ce136 100644
--- a/include/asm-sparc64/mmu.h
+++ b/include/asm-sparc64/mmu.h
@@ -1,7 +1,6 @@
1#ifndef __MMU_H 1#ifndef __MMU_H
2#define __MMU_H 2#define __MMU_H
3 3
4#include <linux/config.h>
5#include <asm/page.h> 4#include <asm/page.h>
6#include <asm/const.h> 5#include <asm/const.h>
7#include <asm/hypervisor.h> 6#include <asm/hypervisor.h>
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h
new file mode 100644
index 000000000000..024088ef9d27
--- /dev/null
+++ b/include/asm-sparc64/of_device.h
@@ -0,0 +1,64 @@
1#ifndef _ASM_SPARC64_OF_DEVICE_H
2#define _ASM_SPARC64_OF_DEVICE_H
3#ifdef __KERNEL__
4
5#include <linux/device.h>
6#include <linux/mod_devicetable.h>
7#include <asm/prom.h>
8
9extern struct bus_type isa_bus_type;
10extern struct bus_type ebus_bus_type;
11extern struct bus_type sbus_bus_type;
12
13/*
14 * The of_device is a kind of "base class" that is a superset of
15 * struct device for use by devices attached to an OF node and
16 * probed using OF properties.
17 */
18struct of_device
19{
20 struct device_node *node; /* OF device node */
21 struct device dev; /* Generic device interface */
22};
23#define to_of_device(d) container_of(d, struct of_device, dev)
24
25extern const struct of_device_id *of_match_device(
26 const struct of_device_id *matches, const struct of_device *dev);
27
28extern struct of_device *of_dev_get(struct of_device *dev);
29extern void of_dev_put(struct of_device *dev);
30
31/*
32 * An of_platform_driver driver is attached to a basic of_device on
33 * the ISA, EBUS, and SBUS busses on sparc64.
34 */
35struct of_platform_driver
36{
37 char *name;
38 struct of_device_id *match_table;
39 struct module *owner;
40
41 int (*probe)(struct of_device* dev, const struct of_device_id *match);
42 int (*remove)(struct of_device* dev);
43
44 int (*suspend)(struct of_device* dev, pm_message_t state);
45 int (*resume)(struct of_device* dev);
46 int (*shutdown)(struct of_device* dev);
47
48 struct device_driver driver;
49};
50#define to_of_platform_driver(drv) container_of(drv,struct of_platform_driver, driver)
51
52extern int of_register_driver(struct of_platform_driver *drv,
53 struct bus_type *bus);
54extern void of_unregister_driver(struct of_platform_driver *drv);
55extern int of_device_register(struct of_device *ofdev);
56extern void of_device_unregister(struct of_device *ofdev);
57extern struct of_device *of_platform_device_create(struct device_node *np,
58 const char *bus_id,
59 struct device *parent,
60 struct bus_type *bus);
61extern void of_release_dev(struct device *dev);
62
63#endif /* __KERNEL__ */
64#endif /* _ASM_SPARC64_OF_DEVICE_H */
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h
index c754676e13ef..a68b0bb05958 100644
--- a/include/asm-sparc64/oplib.h
+++ b/include/asm-sparc64/oplib.h
@@ -9,7 +9,6 @@
9#ifndef __SPARC64_OPLIB_H 9#ifndef __SPARC64_OPLIB_H
10#define __SPARC64_OPLIB_H 10#define __SPARC64_OPLIB_H
11 11
12#include <linux/config.h>
13#include <asm/openprom.h> 12#include <asm/openprom.h>
14 13
15/* OBP version string. */ 14/* OBP version string. */
@@ -324,8 +323,9 @@ extern int prom_pathtoinode(const char *path);
324extern int prom_inst2pkg(int); 323extern int prom_inst2pkg(int);
325 324
326/* CPU probing helpers. */ 325/* CPU probing helpers. */
327int cpu_find_by_instance(int instance, int *prom_node, int *mid); 326struct device_node;
328int cpu_find_by_mid(int mid, int *prom_node); 327int cpu_find_by_instance(int instance, struct device_node **dev_node, int *mid);
328int cpu_find_by_mid(int mid, struct device_node **prom_node);
329 329
330/* Client interface level routines. */ 330/* Client interface level routines. */
331extern void prom_set_trap_table(unsigned long tba); 331extern void prom_set_trap_table(unsigned long tba);
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h
index aabb21906724..fdf0ceb76028 100644
--- a/include/asm-sparc64/page.h
+++ b/include/asm-sparc64/page.h
@@ -3,7 +3,6 @@
3#ifndef _SPARC64_PAGE_H 3#ifndef _SPARC64_PAGE_H
4#define _SPARC64_PAGE_H 4#define _SPARC64_PAGE_H
5 5
6#include <linux/config.h>
7#include <asm/const.h> 6#include <asm/const.h>
8 7
9#if defined(CONFIG_SPARC64_PAGE_SIZE_8KB) 8#if defined(CONFIG_SPARC64_PAGE_SIZE_8KB)
diff --git a/include/asm-sparc64/param.h b/include/asm-sparc64/param.h
index a1cd4974630b..f0125cf5a9df 100644
--- a/include/asm-sparc64/param.h
+++ b/include/asm-sparc64/param.h
@@ -1,7 +1,6 @@
1#ifndef _ASMSPARC64_PARAM_H 1#ifndef _ASMSPARC64_PARAM_H
2#define _ASMSPARC64_PARAM_H 2#define _ASMSPARC64_PARAM_H
3 3
4#include <linux/config.h>
5 4
6#ifdef __KERNEL__ 5#ifdef __KERNEL__
7# define HZ CONFIG_HZ /* Internal kernel timer frequency */ 6# define HZ CONFIG_HZ /* Internal kernel timer frequency */
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index 56b5197d7898..d3895873e4c7 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -67,18 +67,17 @@ static __inline__ unsigned int get_dma_residue(unsigned int dmanr)
67 67
68static int ebus_ecpp_p(struct linux_ebus_device *edev) 68static int ebus_ecpp_p(struct linux_ebus_device *edev)
69{ 69{
70 if (!strcmp(edev->prom_name, "ecpp")) 70 if (!strcmp(edev->prom_node->name, "ecpp"))
71 return 1; 71 return 1;
72 if (!strcmp(edev->prom_name, "parallel")) { 72 if (!strcmp(edev->prom_node->name, "parallel")) {
73 char compat[19]; 73 char *compat;
74 prom_getstring(edev->prom_node, 74
75 "compatible", 75 compat = of_get_property(edev->prom_node,
76 compat, sizeof(compat)); 76 "compatible", NULL);
77 compat[18] = '\0'; 77 if (compat &&
78 if (!strcmp(compat, "ecpp")) 78 (!strcmp(compat, "ecpp") ||
79 return 1; 79 !strcmp(compat, "ns87317-ecpp") ||
80 if (!strcmp(compat, "ns87317-ecpp") && 80 !strcmp(compat + 13, "ecpp")))
81 !strcmp(compat + 13, "ecpp"))
82 return 1; 81 return 1;
83 } 82 }
84 return 0; 83 return 0;
@@ -94,12 +93,12 @@ static int parport_isa_probe(int count)
94 struct sparc_isa_device *child; 93 struct sparc_isa_device *child;
95 unsigned long base; 94 unsigned long base;
96 95
97 if (strcmp(isa_dev->prom_name, "dma")) 96 if (strcmp(isa_dev->prom_node->name, "dma"))
98 continue; 97 continue;
99 98
100 child = isa_dev->child; 99 child = isa_dev->child;
101 while (child) { 100 while (child) {
102 if (!strcmp(child->prom_name, "parallel")) 101 if (!strcmp(child->prom_node->name, "parallel"))
103 break; 102 break;
104 child = child->next; 103 child = child->next;
105 } 104 }
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index 1396f110939a..cebe80b1da6c 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -15,6 +15,7 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/oplib.h> 17#include <asm/oplib.h>
18#include <asm/prom.h>
18#include <asm/iommu.h> 19#include <asm/iommu.h>
19 20
20/* The abstraction used here is that there are PCI controllers, 21/* The abstraction used here is that there are PCI controllers,
@@ -153,16 +154,15 @@ struct pci_pbm_info {
153 int chip_revision; 154 int chip_revision;
154 155
155 /* Name used for top-level resources. */ 156 /* Name used for top-level resources. */
156 char name[64]; 157 char *name;
157 158
158 /* OBP specific information. */ 159 /* OBP specific information. */
159 int prom_node; 160 struct device_node *prom_node;
160 char prom_name[64]; 161 struct linux_prom_pci_ranges *pbm_ranges;
161 struct linux_prom_pci_ranges pbm_ranges[PROM_PCIRNG_MAX];
162 int num_pbm_ranges; 162 int num_pbm_ranges;
163 struct linux_prom_pci_intmap pbm_intmap[PROM_PCIIMAP_MAX]; 163 struct linux_prom_pci_intmap *pbm_intmap;
164 int num_pbm_intmap; 164 int num_pbm_intmap;
165 struct linux_prom_pci_intmask pbm_intmask; 165 struct linux_prom_pci_intmask *pbm_intmask;
166 u64 ino_bitmap; 166 u64 ino_bitmap;
167 167
168 /* PBM I/O and Memory space resources. */ 168 /* PBM I/O and Memory space resources. */
@@ -227,8 +227,7 @@ struct pci_controller_info {
227 */ 227 */
228struct pcidev_cookie { 228struct pcidev_cookie {
229 struct pci_pbm_info *pbm; 229 struct pci_pbm_info *pbm;
230 char prom_name[64]; 230 struct device_node *prom_node;
231 int prom_node;
232 struct linux_prom_pci_registers prom_regs[PROMREG_MAX]; 231 struct linux_prom_pci_registers prom_regs[PROMREG_MAX];
233 int num_prom_regs; 232 int num_prom_regs;
234 struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; 233 struct linux_prom_pci_registers prom_assignments[PROMREG_MAX];
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h
index baef13b58952..a6ece06b83db 100644
--- a/include/asm-sparc64/percpu.h
+++ b/include/asm-sparc64/percpu.h
@@ -21,6 +21,7 @@ register unsigned long __local_per_cpu_offset asm("g5");
21/* var is in discarded region: offset to particular copy we want */ 21/* var is in discarded region: offset to particular copy we want */
22#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) 22#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
23#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) 23#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
24#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
24 25
25/* A macro to avoid #include hell... */ 26/* A macro to avoid #include hell... */
26#define percpu_modcopy(pcpudst, src, size) \ 27#define percpu_modcopy(pcpudst, src, size) \
@@ -37,6 +38,7 @@ do { \
37 38
38#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) 39#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var))
39#define __get_cpu_var(var) per_cpu__##var 40#define __get_cpu_var(var) per_cpu__##var
41#define __raw_get_cpu_var(var) per_cpu__##var
40 42
41#endif /* SMP */ 43#endif /* SMP */
42 44
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 12e4a273bd43..010f9cd0a672 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -2,7 +2,6 @@
2#ifndef _SPARC64_PGALLOC_H 2#ifndef _SPARC64_PGALLOC_H
3#define _SPARC64_PGALLOC_H 3#define _SPARC64_PGALLOC_H
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8#include <linux/mm.h> 7#include <linux/mm.h>
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index cd464f469a2c..03f5bc9b6bec 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -14,7 +14,6 @@
14 14
15#include <asm-generic/pgtable-nopud.h> 15#include <asm-generic/pgtable-nopud.h>
16 16
17#include <linux/config.h>
18#include <linux/compiler.h> 17#include <linux/compiler.h>
19#include <asm/types.h> 18#include <asm/types.h>
20#include <asm/spitfire.h> 19#include <asm/spitfire.h>
@@ -757,6 +756,8 @@ extern unsigned long *sparc64_valid_addr_bitmap;
757#define kern_addr_valid(addr) \ 756#define kern_addr_valid(addr) \
758 (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) 757 (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap))
759 758
759extern int page_in_phys_avail(unsigned long paddr);
760
760extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, 761extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
761 unsigned long pfn, 762 unsigned long pfn,
762 unsigned long size, pgprot_t prot); 763 unsigned long size, pgprot_t prot);
diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h
index 79f827eb3f5d..72927749aebf 100644
--- a/include/asm-sparc64/pil.h
+++ b/include/asm-sparc64/pil.h
@@ -5,9 +5,9 @@
5/* To avoid some locking problems, we hard allocate certain PILs 5/* To avoid some locking problems, we hard allocate certain PILs
6 * for SMP cross call messages that must do a etrap/rtrap. 6 * for SMP cross call messages that must do a etrap/rtrap.
7 * 7 *
8 * A cli() does not block the cross call delivery, so when SMP 8 * A local_irq_disable() does not block the cross call delivery, so
9 * locking is an issue we reschedule the event into a PIL interrupt 9 * when SMP locking is an issue we reschedule the event into a PIL
10 * which is blocked by cli(). 10 * interrupt which is blocked by local_irq_disable().
11 * 11 *
12 * In fact any XCALL which has to etrap/rtrap has a problem because 12 * In fact any XCALL which has to etrap/rtrap has a problem because
13 * it is difficult to prevent rtrap from running BH's, and that would 13 * it is difficult to prevent rtrap from running BH's, and that would
@@ -17,6 +17,7 @@
17#define PIL_SMP_RECEIVE_SIGNAL 2 17#define PIL_SMP_RECEIVE_SIGNAL 2
18#define PIL_SMP_CAPTURE 3 18#define PIL_SMP_CAPTURE 3
19#define PIL_SMP_CTX_NEW_VERSION 4 19#define PIL_SMP_CTX_NEW_VERSION 4
20#define PIL_DEVICE_IRQ 5
20 21
21#ifndef __ASSEMBLY__ 22#ifndef __ASSEMBLY__
22#define PIL_RESERVED(PIL) ((PIL) == PIL_SMP_CALL_FUNC || \ 23#define PIL_RESERVED(PIL) ((PIL) == PIL_SMP_CALL_FUNC || \
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index c6896b88283e..66dd2fa0e319 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -13,7 +13,6 @@
13 */ 13 */
14#define current_text_addr() ({ void *pc; __asm__("rd %%pc, %0" : "=r" (pc)); pc; }) 14#define current_text_addr() ({ void *pc; __asm__("rd %%pc, %0" : "=r" (pc)); pc; })
15 15
16#include <linux/config.h>
17#include <asm/asi.h> 16#include <asm/asi.h>
18#include <asm/a.out.h> 17#include <asm/a.out.h>
19#include <asm/pstate.h> 18#include <asm/pstate.h>
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h
new file mode 100644
index 000000000000..265614d497c4
--- /dev/null
+++ b/include/asm-sparc64/prom.h
@@ -0,0 +1,108 @@
1#ifndef _SPARC64_PROM_H
2#define _SPARC64_PROM_H
3#ifdef __KERNEL__
4
5
6/*
7 * Definitions for talking to the Open Firmware PROM on
8 * Power Macintosh computers.
9 *
10 * Copyright (C) 1996-2005 Paul Mackerras.
11 *
12 * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
13 * Updates for SPARC64 by David S. Miller
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version
18 * 2 of the License, or (at your option) any later version.
19 */
20
21#include <linux/types.h>
22#include <linux/proc_fs.h>
23#include <asm/atomic.h>
24
25typedef u32 phandle;
26typedef u32 ihandle;
27
28struct interrupt_info {
29 int line;
30 int sense; /* +ve/-ve logic, edge or level, etc. */
31};
32
33struct property {
34 char *name;
35 int length;
36 void *value;
37 struct property *next;
38 unsigned long _flags;
39 unsigned int unique_id;
40};
41
42struct device_node {
43 char *name;
44 char *type;
45 phandle node;
46 phandle linux_phandle;
47 int n_intrs;
48 struct interrupt_info *intrs;
49 char *path_component_name;
50 char *full_name;
51
52 struct property *properties;
53 struct property *deadprops; /* removed properties */
54 struct device_node *parent;
55 struct device_node *child;
56 struct device_node *sibling;
57 struct device_node *next; /* next device of same type */
58 struct device_node *allnext; /* next in list of all nodes */
59 struct proc_dir_entry *pde; /* this node's proc directory */
60 struct kref kref;
61 unsigned long _flags;
62 void *data;
63 unsigned int unique_id;
64};
65
66/* flag descriptions */
67#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
68
69#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
70#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
71
72static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
73{
74 dn->pde = de;
75}
76
77extern struct device_node *of_find_node_by_name(struct device_node *from,
78 const char *name);
79#define for_each_node_by_name(dn, name) \
80 for (dn = of_find_node_by_name(NULL, name); dn; \
81 dn = of_find_node_by_name(dn, name))
82extern struct device_node *of_find_node_by_type(struct device_node *from,
83 const char *type);
84#define for_each_node_by_type(dn, type) \
85 for (dn = of_find_node_by_type(NULL, type); dn; \
86 dn = of_find_node_by_type(dn, type))
87extern struct device_node *of_find_compatible_node(struct device_node *from,
88 const char *type, const char *compat);
89extern struct device_node *of_find_node_by_path(const char *path);
90extern struct device_node *of_find_node_by_phandle(phandle handle);
91extern struct device_node *of_get_parent(const struct device_node *node);
92extern struct device_node *of_get_next_child(const struct device_node *node,
93 struct device_node *prev);
94extern struct property *of_find_property(struct device_node *np,
95 const char *name,
96 int *lenp);
97extern int of_device_is_compatible(struct device_node *device, const char *);
98extern void *of_get_property(struct device_node *node, const char *name,
99 int *lenp);
100extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
101extern int of_getintprop_default(struct device_node *np,
102 const char *name,
103 int def);
104
105extern void prom_build_devicetree(void);
106
107#endif /* __KERNEL__ */
108#endif /* _SPARC64_PROM_H */
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h
index 48279e10f385..56ee985e4605 100644
--- a/include/asm-sparc64/sbus.h
+++ b/include/asm-sparc64/sbus.h
@@ -11,6 +11,8 @@
11#include <linux/ioport.h> 11#include <linux/ioport.h>
12 12
13#include <asm/oplib.h> 13#include <asm/oplib.h>
14#include <asm/prom.h>
15#include <asm/of_device.h>
14#include <asm/iommu.h> 16#include <asm/iommu.h>
15#include <asm/scatterlist.h> 17#include <asm/scatterlist.h>
16 18
@@ -42,18 +44,19 @@ struct sbus_bus;
42 44
43/* Linux SBUS device tables */ 45/* Linux SBUS device tables */
44struct sbus_dev { 46struct sbus_dev {
45 struct sbus_bus *bus; /* Our toplevel parent SBUS */ 47 struct of_device ofdev;
46 struct sbus_dev *next; /* Chain of siblings */ 48 struct sbus_bus *bus;
47 struct sbus_dev *child; /* Chain of children */ 49 struct sbus_dev *next;
48 struct sbus_dev *parent;/* Parent device if not toplevel*/ 50 struct sbus_dev *child;
49 int prom_node; /* OBP node of this device */ 51 struct sbus_dev *parent;
50 char prom_name[64]; /* OBP device name property */ 52 int prom_node;
51 int slot; /* SBUS slot number */ 53 char prom_name[64];
54 int slot;
52 55
53 struct resource resource[PROMREG_MAX]; 56 struct resource resource[PROMREG_MAX];
54 57
55 struct linux_prom_registers reg_addrs[PROMREG_MAX]; 58 struct linux_prom_registers reg_addrs[PROMREG_MAX];
56 int num_registers, ranges_applied; 59 int num_registers;
57 60
58 struct linux_prom_ranges device_ranges[PROMREG_MAX]; 61 struct linux_prom_ranges device_ranges[PROMREG_MAX];
59 int num_device_ranges; 62 int num_device_ranges;
@@ -61,9 +64,11 @@ struct sbus_dev {
61 unsigned int irqs[4]; 64 unsigned int irqs[4];
62 int num_irqs; 65 int num_irqs;
63}; 66};
67#define to_sbus_device(d) container_of(d, struct sbus_dev, ofdev.dev)
64 68
65/* This struct describes the SBus(s) found on this machine. */ 69/* This struct describes the SBus(s) found on this machine. */
66struct sbus_bus { 70struct sbus_bus {
71 struct of_device ofdev;
67 void *iommu; /* Opaque IOMMU cookie */ 72 void *iommu; /* Opaque IOMMU cookie */
68 struct sbus_dev *devices; /* Tree of SBUS devices */ 73 struct sbus_dev *devices; /* Tree of SBUS devices */
69 struct sbus_bus *next; /* Next SBUS in system */ 74 struct sbus_bus *next; /* Next SBUS in system */
@@ -77,6 +82,7 @@ struct sbus_bus {
77 int portid; 82 int portid;
78 void *starfire_cookie; 83 void *starfire_cookie;
79}; 84};
85#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev)
80 86
81extern struct sbus_bus *sbus_root; 87extern struct sbus_bus *sbus_root;
82 88
@@ -95,6 +101,7 @@ extern struct sbus_bus *sbus_root;
95#define sbus_can_dma_64bit(sdev) (1) 101#define sbus_can_dma_64bit(sdev) (1)
96#define sbus_can_burst64(sdev) (1) 102#define sbus_can_burst64(sdev) (1)
97extern void sbus_set_sbus64(struct sbus_dev *, int); 103extern void sbus_set_sbus64(struct sbus_dev *, int);
104extern void sbus_fill_device_irq(struct sbus_dev *);
98 105
99/* These yield IOMMU mappings in consistent mode. */ 106/* These yield IOMMU mappings in consistent mode. */
100extern void *sbus_alloc_consistent(struct sbus_dev *, size_t, dma_addr_t *dma_addrp); 107extern void *sbus_alloc_consistent(struct sbus_dev *, size_t, dma_addr_t *dma_addrp);
@@ -119,4 +126,10 @@ extern void sbus_dma_sync_sg_for_cpu(struct sbus_dev *, struct scatterlist *, in
119#define sbus_dma_sync_sg sbus_dma_sync_sg_for_cpu 126#define sbus_dma_sync_sg sbus_dma_sync_sg_for_cpu
120extern void sbus_dma_sync_sg_for_device(struct sbus_dev *, struct scatterlist *, int, int); 127extern void sbus_dma_sync_sg_for_device(struct sbus_dev *, struct scatterlist *, int, int);
121 128
129extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *);
130extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *);
131extern void sbus_setup_arch_props(struct sbus_bus *, struct device_node *);
132extern int sbus_arch_preinit(void);
133extern void sbus_arch_postinit(void);
134
122#endif /* !(_SPARC64_SBUS_H) */ 135#endif /* !(_SPARC64_SBUS_H) */
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index df17e47abc1c..c96e6c30f8b0 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -11,7 +11,6 @@
11 11
12#ifdef __KERNEL__ 12#ifdef __KERNEL__
13 13
14#include <linux/config.h>
15#include <linux/compat.h> 14#include <linux/compat.h>
16 15
17#ifdef CONFIG_COMPAT 16#ifdef CONFIG_COMPAT
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index e3059bb4a465..fdc42a14d4e6 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -6,7 +6,6 @@
6 6
7#ifdef __KERNEL__ 7#ifdef __KERNEL__
8#ifndef __ASSEMBLY__ 8#ifndef __ASSEMBLY__
9#include <linux/config.h>
10#include <linux/personality.h> 9#include <linux/personality.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/compat.h> 11#include <linux/compat.h>
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index 89d86ecaab24..388249b751c3 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -6,7 +6,6 @@
6#ifndef _SPARC64_SMP_H 6#ifndef _SPARC64_SMP_H
7#define _SPARC64_SMP_H 7#define _SPARC64_SMP_H
8 8
9#include <linux/config.h>
10#include <linux/threads.h> 9#include <linux/threads.h>
11#include <asm/asi.h> 10#include <asm/asi.h>
12#include <asm/starfire.h> 11#include <asm/starfire.h>
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h
index 508c416e9d6a..bd5ffc76bc7e 100644
--- a/include/asm-sparc64/spinlock.h
+++ b/include/asm-sparc64/spinlock.h
@@ -6,7 +6,6 @@
6#ifndef __SPARC64_SPINLOCK_H 6#ifndef __SPARC64_SPINLOCK_H
7#define __SPARC64_SPINLOCK_H 7#define __SPARC64_SPINLOCK_H
8 8
9#include <linux/config.h>
10#include <linux/threads.h> /* For NR_CPUS */ 9#include <linux/threads.h> /* For NR_CPUS */
11 10
12#ifndef __ASSEMBLY__ 11#ifndef __ASSEMBLY__
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
index a18ec87a52c1..4ca68600c670 100644
--- a/include/asm-sparc64/system.h
+++ b/include/asm-sparc64/system.h
@@ -2,7 +2,6 @@
2#ifndef __SPARC64_SYSTEM_H 2#ifndef __SPARC64_SYSTEM_H
3#define __SPARC64_SYSTEM_H 3#define __SPARC64_SYSTEM_H
4 4
5#include <linux/config.h>
6#include <asm/ptrace.h> 5#include <asm/ptrace.h>
7#include <asm/processor.h> 6#include <asm/processor.h>
8#include <asm/visasm.h> 7#include <asm/visasm.h>
diff --git a/include/asm-sparc64/timer.h b/include/asm-sparc64/timer.h
index edc8e08c3a39..d435594df786 100644
--- a/include/asm-sparc64/timer.h
+++ b/include/asm-sparc64/timer.h
@@ -9,7 +9,6 @@
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11 11
12#include <linux/config.h>
13 12
14struct sparc64_tick_ops { 13struct sparc64_tick_ops {
15 void (*init_tick)(unsigned long); 14 void (*init_tick)(unsigned long);
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h
index 61c01882b562..7af1e1109c49 100644
--- a/include/asm-sparc64/tlb.h
+++ b/include/asm-sparc64/tlb.h
@@ -1,7 +1,6 @@
1#ifndef _SPARC64_TLB_H 1#ifndef _SPARC64_TLB_H
2#define _SPARC64_TLB_H 2#define _SPARC64_TLB_H
3 3
4#include <linux/config.h>
5#include <linux/swap.h> 4#include <linux/swap.h>
6#include <asm/pgalloc.h> 5#include <asm/pgalloc.h>
7#include <asm/tlbflush.h> 6#include <asm/tlbflush.h>
diff --git a/include/asm-sparc64/tlbflush.h b/include/asm-sparc64/tlbflush.h
index e3a7c453b500..3487328570ed 100644
--- a/include/asm-sparc64/tlbflush.h
+++ b/include/asm-sparc64/tlbflush.h
@@ -1,7 +1,6 @@
1#ifndef _SPARC64_TLBFLUSH_H 1#ifndef _SPARC64_TLBFLUSH_H
2#define _SPARC64_TLBFLUSH_H 2#define _SPARC64_TLBFLUSH_H
3 3
4#include <linux/config.h>
5#include <linux/mm.h> 4#include <linux/mm.h>
6#include <asm/mmu_context.h> 5#include <asm/mmu_context.h>
7 6
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h
index 2d5e3c464df5..f2352606a79f 100644
--- a/include/asm-sparc64/ttable.h
+++ b/include/asm-sparc64/ttable.h
@@ -2,7 +2,6 @@
2#ifndef _SPARC64_TTABLE_H 2#ifndef _SPARC64_TTABLE_H
3#define _SPARC64_TTABLE_H 3#define _SPARC64_TTABLE_H
4 4
5#include <linux/config.h>
6#include <asm/utrap.h> 5#include <asm/utrap.h>
7 6
8#ifdef __ASSEMBLY__ 7#ifdef __ASSEMBLY__
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 998ef4ab0e06..badc73fdcb97 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -321,6 +321,7 @@
321#define __NR_set_robust_list 300 321#define __NR_set_robust_list 300
322#define __NR_get_robust_list 301 322#define __NR_get_robust_list 301
323 323
324#ifdef __KERNEL__
324/* WARNING: You MAY NOT add syscall numbers larger than 301, since 325/* WARNING: You MAY NOT add syscall numbers larger than 301, since
325 * all of the syscall tables in the Sparc kernel are 326 * all of the syscall tables in the Sparc kernel are
326 * sized to have 301 entries (starting at zero). Therefore 327 * sized to have 301 entries (starting at zero). Therefore
@@ -487,7 +488,6 @@ asmlinkage long sys_rt_sigaction(int sig,
487 488
488#endif /* __KERNEL_SYSCALLS__ */ 489#endif /* __KERNEL_SYSCALLS__ */
489 490
490#ifdef __KERNEL__
491/* sysconf options, for SunOS compatibility */ 491/* sysconf options, for SunOS compatibility */
492#define _SC_ARG_MAX 1 492#define _SC_ARG_MAX 1
493#define _SC_CHILD_MAX 2 493#define _SC_CHILD_MAX 2
@@ -521,7 +521,6 @@ asmlinkage long sys_rt_sigaction(int sig,
521#define __ARCH_WANT_SYS_SIGPROCMASK 521#define __ARCH_WANT_SYS_SIGPROCMASK
522#define __ARCH_WANT_SYS_RT_SIGSUSPEND 522#define __ARCH_WANT_SYS_RT_SIGSUSPEND
523#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 523#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
524#endif
525 524
526/* 525/*
527 * "Conditional" syscalls 526 * "Conditional" syscalls
@@ -531,4 +530,5 @@ asmlinkage long sys_rt_sigaction(int sig,
531 */ 530 */
532#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 531#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
533 532
533#endif /* __KERNEL__ */
534#endif /* _SPARC64_UNISTD_H */ 534#endif /* _SPARC64_UNISTD_H */
diff --git a/include/asm-sparc64/vdev.h b/include/asm-sparc64/vdev.h
index 996e6be7b976..25637c57675d 100644
--- a/include/asm-sparc64/vdev.h
+++ b/include/asm-sparc64/vdev.h
@@ -7,10 +7,11 @@
7#define _SPARC64_VDEV_H 7#define _SPARC64_VDEV_H
8 8
9#include <linux/types.h> 9#include <linux/types.h>
10#include <asm/prom.h>
10 11
11extern u32 sun4v_vdev_devhandle; 12extern u32 sun4v_vdev_devhandle;
12extern int sun4v_vdev_root; 13extern struct device_node *sun4v_vdev_root;
13 14
14extern unsigned int sun4v_vdev_device_interrupt(unsigned int); 15extern unsigned int sun4v_vdev_device_interrupt(struct device_node *dev_node);
15 16
16#endif /* !(_SPARC64_VDEV_H) */ 17#endif /* !(_SPARC64_VDEV_H) */
diff --git a/include/asm-sparc64/vga.h b/include/asm-sparc64/vga.h
index 9c57eb363b40..c69d5b2ba19a 100644
--- a/include/asm-sparc64/vga.h
+++ b/include/asm-sparc64/vga.h
@@ -28,6 +28,6 @@ static inline u16 scr_readw(const u16 *addr)
28 return *addr; 28 return *addr;
29} 29}
30 30
31#define VGA_MAP_MEM(x) (x) 31#define VGA_MAP_MEM(x,s) (x)
32 32
33#endif 33#endif