aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2014-05-16 17:25:51 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-18 22:01:29 -0400
commit2e74a74f271f4d3fc768b6f06bd72eb57eac36ac (patch)
tree22e4b460c69b05ddfd8e05ec328ab88d493eaa55
parentf05a68653e56ca2f23bccf7e50be69486886f052 (diff)
sparc: drop use of extern for prototypes in arch/sparc/*
Drop the remaining uses of extern for prototypes in .h files in the sparc specific part of the kernel tree. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/kernel/cpumap.h4
-rw-r--r--arch/sparc/kernel/entry.h259
-rw-r--r--arch/sparc/kernel/iommu_common.h14
-rw-r--r--arch/sparc/kernel/irq.h2
-rw-r--r--arch/sparc/kernel/kernel.h36
-rw-r--r--arch/sparc/kernel/pci_impl.h30
-rw-r--r--arch/sparc/kernel/pci_sun4v.h156
-rw-r--r--arch/sparc/kernel/prom.h2
-rw-r--r--arch/sparc/kernel/psycho_common.h22
-rw-r--r--arch/sparc/mm/init_64.h4
10 files changed, 264 insertions, 265 deletions
diff --git a/arch/sparc/kernel/cpumap.h b/arch/sparc/kernel/cpumap.h
index e639880ab864..9dac398c434a 100644
--- a/arch/sparc/kernel/cpumap.h
+++ b/arch/sparc/kernel/cpumap.h
@@ -2,8 +2,8 @@
2#define _CPUMAP_H 2#define _CPUMAP_H
3 3
4#ifdef CONFIG_SMP 4#ifdef CONFIG_SMP
5extern void cpu_map_rebuild(void); 5void cpu_map_rebuild(void);
6extern int map_to_cpu(unsigned int index); 6int map_to_cpu(unsigned int index);
7#define cpu_map_init() cpu_map_rebuild() 7#define cpu_map_init() cpu_map_rebuild()
8#else 8#else
9#define cpu_map_init() do {} while (0) 9#define cpu_map_init() do {} while (0)
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h
index 140966fbd303..ebaba6167dd4 100644
--- a/arch/sparc/kernel/entry.h
+++ b/arch/sparc/kernel/entry.h
@@ -6,40 +6,39 @@
6#include <linux/init.h> 6#include <linux/init.h>
7 7
8/* irq */ 8/* irq */
9extern void handler_irq(int irq, struct pt_regs *regs); 9void handler_irq(int irq, struct pt_regs *regs);
10 10
11#ifdef CONFIG_SPARC32 11#ifdef CONFIG_SPARC32
12/* traps */ 12/* traps */
13extern void do_hw_interrupt(struct pt_regs *regs, unsigned long type); 13void do_hw_interrupt(struct pt_regs *regs, unsigned long type);
14extern void do_illegal_instruction(struct pt_regs *regs, unsigned long pc, 14void do_illegal_instruction(struct pt_regs *regs, unsigned long pc,
15 unsigned long npc, unsigned long psr); 15 unsigned long npc, unsigned long psr);
16 16
17extern void do_priv_instruction(struct pt_regs *regs, unsigned long pc, 17void do_priv_instruction(struct pt_regs *regs, unsigned long pc,
18 unsigned long npc, unsigned long psr); 18 unsigned long npc, unsigned long psr);
19extern void do_memaccess_unaligned(struct pt_regs *regs, unsigned long pc, 19void do_memaccess_unaligned(struct pt_regs *regs, unsigned long pc,
20 unsigned long npc, 20 unsigned long npc, unsigned long psr);
21 unsigned long psr); 21void do_fpd_trap(struct pt_regs *regs, unsigned long pc,
22extern void do_fpd_trap(struct pt_regs *regs, unsigned long pc, 22 unsigned long npc, unsigned long psr);
23void do_fpe_trap(struct pt_regs *regs, unsigned long pc,
24 unsigned long npc, unsigned long psr);
25void handle_tag_overflow(struct pt_regs *regs, unsigned long pc,
26 unsigned long npc, unsigned long psr);
27void handle_watchpoint(struct pt_regs *regs, unsigned long pc,
28 unsigned long npc, unsigned long psr);
29void handle_reg_access(struct pt_regs *regs, unsigned long pc,
30 unsigned long npc, unsigned long psr);
31void handle_cp_disabled(struct pt_regs *regs, unsigned long pc,
23 unsigned long npc, unsigned long psr); 32 unsigned long npc, unsigned long psr);
24extern void do_fpe_trap(struct pt_regs *regs, unsigned long pc, 33void handle_cp_exception(struct pt_regs *regs, unsigned long pc,
25 unsigned long npc, unsigned long psr); 34 unsigned long npc, unsigned long psr);
26extern void handle_tag_overflow(struct pt_regs *regs, unsigned long pc,
27 unsigned long npc, unsigned long psr);
28extern void handle_watchpoint(struct pt_regs *regs, unsigned long pc,
29 unsigned long npc, unsigned long psr);
30extern void handle_reg_access(struct pt_regs *regs, unsigned long pc,
31 unsigned long npc, unsigned long psr);
32extern void handle_cp_disabled(struct pt_regs *regs, unsigned long pc,
33 unsigned long npc, unsigned long psr);
34extern void handle_cp_exception(struct pt_regs *regs, unsigned long pc,
35 unsigned long npc, unsigned long psr);
36 35
37 36
38 37
39/* entry.S */ 38/* entry.S */
40extern void fpsave(unsigned long *fpregs, unsigned long *fsr, 39void fpsave(unsigned long *fpregs, unsigned long *fsr,
41 void *fpqueue, unsigned long *fpqdepth); 40 void *fpqueue, unsigned long *fpqdepth);
42extern void fpload(unsigned long *fpregs, unsigned long *fsr); 41void fpload(unsigned long *fpregs, unsigned long *fsr);
43 42
44#else /* CONFIG_SPARC32 */ 43#else /* CONFIG_SPARC32 */
45 44
@@ -66,123 +65,123 @@ struct pause_patch_entry {
66extern struct pause_patch_entry __pause_3insn_patch, 65extern struct pause_patch_entry __pause_3insn_patch,
67 __pause_3insn_patch_end; 66 __pause_3insn_patch_end;
68 67
69extern void __init per_cpu_patch(void); 68void __init per_cpu_patch(void);
70extern void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *, 69void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *,
71 struct sun4v_1insn_patch_entry *); 70 struct sun4v_1insn_patch_entry *);
72extern void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *, 71void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *,
73 struct sun4v_2insn_patch_entry *); 72 struct sun4v_2insn_patch_entry *);
74extern void __init sun4v_patch(void); 73void __init sun4v_patch(void);
75extern void __init boot_cpu_id_too_large(int cpu); 74void __init boot_cpu_id_too_large(int cpu);
76extern unsigned int dcache_parity_tl1_occurred; 75extern unsigned int dcache_parity_tl1_occurred;
77extern unsigned int icache_parity_tl1_occurred; 76extern unsigned int icache_parity_tl1_occurred;
78 77
79extern asmlinkage void sparc_breakpoint(struct pt_regs *regs); 78asmlinkage void sparc_breakpoint(struct pt_regs *regs);
80extern void timer_interrupt(int irq, struct pt_regs *regs); 79void timer_interrupt(int irq, struct pt_regs *regs);
81 80
82extern void do_notify_resume(struct pt_regs *regs, 81void do_notify_resume(struct pt_regs *regs,
83 unsigned long orig_i0, 82 unsigned long orig_i0,
84 unsigned long thread_info_flags); 83 unsigned long thread_info_flags);
85 84
86extern asmlinkage int syscall_trace_enter(struct pt_regs *regs); 85asmlinkage int syscall_trace_enter(struct pt_regs *regs);
87extern asmlinkage void syscall_trace_leave(struct pt_regs *regs); 86asmlinkage void syscall_trace_leave(struct pt_regs *regs);
88 87
89extern void bad_trap_tl1(struct pt_regs *regs, long lvl); 88void bad_trap_tl1(struct pt_regs *regs, long lvl);
90 89
91extern void do_fpieee(struct pt_regs *regs); 90void do_fpieee(struct pt_regs *regs);
92extern void do_fpother(struct pt_regs *regs); 91void do_fpother(struct pt_regs *regs);
93extern void do_tof(struct pt_regs *regs); 92void do_tof(struct pt_regs *regs);
94extern void do_div0(struct pt_regs *regs); 93void do_div0(struct pt_regs *regs);
95extern void do_illegal_instruction(struct pt_regs *regs); 94void do_illegal_instruction(struct pt_regs *regs);
96extern void mem_address_unaligned(struct pt_regs *regs, 95void mem_address_unaligned(struct pt_regs *regs,
97 unsigned long sfar, 96 unsigned long sfar,
98 unsigned long sfsr); 97 unsigned long sfsr);
99extern void sun4v_do_mna(struct pt_regs *regs, 98void sun4v_do_mna(struct pt_regs *regs,
100 unsigned long addr, 99 unsigned long addr,
101 unsigned long type_ctx); 100 unsigned long type_ctx);
102extern void do_privop(struct pt_regs *regs); 101void do_privop(struct pt_regs *regs);
103extern void do_privact(struct pt_regs *regs); 102void do_privact(struct pt_regs *regs);
104extern void do_cee(struct pt_regs *regs); 103void do_cee(struct pt_regs *regs);
105extern void do_cee_tl1(struct pt_regs *regs); 104void do_cee_tl1(struct pt_regs *regs);
106extern void do_dae_tl1(struct pt_regs *regs); 105void do_dae_tl1(struct pt_regs *regs);
107extern void do_iae_tl1(struct pt_regs *regs); 106void do_iae_tl1(struct pt_regs *regs);
108extern void do_div0_tl1(struct pt_regs *regs); 107void do_div0_tl1(struct pt_regs *regs);
109extern void do_fpdis_tl1(struct pt_regs *regs); 108void do_fpdis_tl1(struct pt_regs *regs);
110extern void do_fpieee_tl1(struct pt_regs *regs); 109void do_fpieee_tl1(struct pt_regs *regs);
111extern void do_fpother_tl1(struct pt_regs *regs); 110void do_fpother_tl1(struct pt_regs *regs);
112extern void do_ill_tl1(struct pt_regs *regs); 111void do_ill_tl1(struct pt_regs *regs);
113extern void do_irq_tl1(struct pt_regs *regs); 112void do_irq_tl1(struct pt_regs *regs);
114extern void do_lddfmna_tl1(struct pt_regs *regs); 113void do_lddfmna_tl1(struct pt_regs *regs);
115extern void do_stdfmna_tl1(struct pt_regs *regs); 114void do_stdfmna_tl1(struct pt_regs *regs);
116extern void do_paw(struct pt_regs *regs); 115void do_paw(struct pt_regs *regs);
117extern void do_paw_tl1(struct pt_regs *regs); 116void do_paw_tl1(struct pt_regs *regs);
118extern void do_vaw(struct pt_regs *regs); 117void do_vaw(struct pt_regs *regs);
119extern void do_vaw_tl1(struct pt_regs *regs); 118void do_vaw_tl1(struct pt_regs *regs);
120extern void do_tof_tl1(struct pt_regs *regs); 119void do_tof_tl1(struct pt_regs *regs);
121extern void do_getpsr(struct pt_regs *regs); 120void do_getpsr(struct pt_regs *regs);
122 121
123extern void spitfire_insn_access_exception(struct pt_regs *regs, 122void spitfire_insn_access_exception(struct pt_regs *regs,
124 unsigned long sfsr, 123 unsigned long sfsr,
125 unsigned long sfar); 124 unsigned long sfar);
126extern void spitfire_insn_access_exception_tl1(struct pt_regs *regs, 125void spitfire_insn_access_exception_tl1(struct pt_regs *regs,
127 unsigned long sfsr, 126 unsigned long sfsr,
128 unsigned long sfar); 127 unsigned long sfar);
129extern void spitfire_data_access_exception(struct pt_regs *regs, 128void spitfire_data_access_exception(struct pt_regs *regs,
130 unsigned long sfsr, 129 unsigned long sfsr,
131 unsigned long sfar); 130 unsigned long sfar);
132extern void spitfire_data_access_exception_tl1(struct pt_regs *regs, 131void spitfire_data_access_exception_tl1(struct pt_regs *regs,
133 unsigned long sfsr, 132 unsigned long sfsr,
134 unsigned long sfar); 133 unsigned long sfar);
135extern void spitfire_access_error(struct pt_regs *regs, 134void spitfire_access_error(struct pt_regs *regs,
136 unsigned long status_encoded, 135 unsigned long status_encoded,
137 unsigned long afar); 136 unsigned long afar);
138 137
139extern void cheetah_fecc_handler(struct pt_regs *regs, 138void cheetah_fecc_handler(struct pt_regs *regs,
140 unsigned long afsr, 139 unsigned long afsr,
141 unsigned long afar); 140 unsigned long afar);
142extern void cheetah_cee_handler(struct pt_regs *regs, 141void cheetah_cee_handler(struct pt_regs *regs,
143 unsigned long afsr, 142 unsigned long afsr,
144 unsigned long afar); 143 unsigned long afar);
145extern void cheetah_deferred_handler(struct pt_regs *regs, 144void cheetah_deferred_handler(struct pt_regs *regs,
146 unsigned long afsr, 145 unsigned long afsr,
147 unsigned long afar); 146 unsigned long afar);
148extern void cheetah_plus_parity_error(int type, struct pt_regs *regs); 147void cheetah_plus_parity_error(int type, struct pt_regs *regs);
149 148
150extern void sun4v_insn_access_exception(struct pt_regs *regs, 149void sun4v_insn_access_exception(struct pt_regs *regs,
151 unsigned long addr, 150 unsigned long addr,
152 unsigned long type_ctx); 151 unsigned long type_ctx);
153extern void sun4v_insn_access_exception_tl1(struct pt_regs *regs, 152void sun4v_insn_access_exception_tl1(struct pt_regs *regs,
154 unsigned long addr, 153 unsigned long addr,
155 unsigned long type_ctx); 154 unsigned long type_ctx);
156extern void sun4v_data_access_exception(struct pt_regs *regs, 155void sun4v_data_access_exception(struct pt_regs *regs,
157 unsigned long addr, 156 unsigned long addr,
158 unsigned long type_ctx); 157 unsigned long type_ctx);
159extern void sun4v_data_access_exception_tl1(struct pt_regs *regs, 158void sun4v_data_access_exception_tl1(struct pt_regs *regs,
160 unsigned long addr, 159 unsigned long addr,
161 unsigned long type_ctx); 160 unsigned long type_ctx);
162extern void sun4v_resum_error(struct pt_regs *regs, 161void sun4v_resum_error(struct pt_regs *regs,
163 unsigned long offset); 162 unsigned long offset);
164extern void sun4v_resum_overflow(struct pt_regs *regs); 163void sun4v_resum_overflow(struct pt_regs *regs);
165extern void sun4v_nonresum_error(struct pt_regs *regs, 164void sun4v_nonresum_error(struct pt_regs *regs,
166 unsigned long offset); 165 unsigned long offset);
167extern void sun4v_nonresum_overflow(struct pt_regs *regs); 166void sun4v_nonresum_overflow(struct pt_regs *regs);
168 167
169extern unsigned long sun4v_err_itlb_vaddr; 168extern unsigned long sun4v_err_itlb_vaddr;
170extern unsigned long sun4v_err_itlb_ctx; 169extern unsigned long sun4v_err_itlb_ctx;
171extern unsigned long sun4v_err_itlb_pte; 170extern unsigned long sun4v_err_itlb_pte;
172extern unsigned long sun4v_err_itlb_error; 171extern unsigned long sun4v_err_itlb_error;
173 172
174extern void sun4v_itlb_error_report(struct pt_regs *regs, int tl); 173void sun4v_itlb_error_report(struct pt_regs *regs, int tl);
175 174
176extern unsigned long sun4v_err_dtlb_vaddr; 175extern unsigned long sun4v_err_dtlb_vaddr;
177extern unsigned long sun4v_err_dtlb_ctx; 176extern unsigned long sun4v_err_dtlb_ctx;
178extern unsigned long sun4v_err_dtlb_pte; 177extern unsigned long sun4v_err_dtlb_pte;
179extern unsigned long sun4v_err_dtlb_error; 178extern unsigned long sun4v_err_dtlb_error;
180 179
181extern void sun4v_dtlb_error_report(struct pt_regs *regs, int tl); 180void sun4v_dtlb_error_report(struct pt_regs *regs, int tl);
182extern void hypervisor_tlbop_error(unsigned long err, 181void hypervisor_tlbop_error(unsigned long err,
183 unsigned long op); 182 unsigned long op);
184extern void hypervisor_tlbop_error_xcall(unsigned long err, 183void hypervisor_tlbop_error_xcall(unsigned long err,
185 unsigned long op); 184 unsigned long op);
186 185
187/* WARNING: The error trap handlers in assembly know the precise 186/* WARNING: The error trap handlers in assembly know the precise
188 * layout of the following structure. 187 * layout of the following structure.
@@ -248,8 +247,8 @@ struct ino_bucket {
248extern struct ino_bucket *ivector_table; 247extern struct ino_bucket *ivector_table;
249extern unsigned long ivector_table_pa; 248extern unsigned long ivector_table_pa;
250 249
251extern void init_irqwork_curcpu(void); 250void init_irqwork_curcpu(void);
252extern void sun4v_register_mondo_queues(int this_cpu); 251void sun4v_register_mondo_queues(int this_cpu);
253 252
254#endif /* CONFIG_SPARC32 */ 253#endif /* CONFIG_SPARC32 */
255#endif /* _ENTRY_H */ 254#endif /* _ENTRY_H */
diff --git a/arch/sparc/kernel/iommu_common.h b/arch/sparc/kernel/iommu_common.h
index 591f5879039c..1ec0de4156e7 100644
--- a/arch/sparc/kernel/iommu_common.h
+++ b/arch/sparc/kernel/iommu_common.h
@@ -48,12 +48,12 @@ static inline int is_span_boundary(unsigned long entry,
48 return iommu_is_span_boundary(entry, nr, shift, boundary_size); 48 return iommu_is_span_boundary(entry, nr, shift, boundary_size);
49} 49}
50 50
51extern unsigned long iommu_range_alloc(struct device *dev, 51unsigned long iommu_range_alloc(struct device *dev,
52 struct iommu *iommu, 52 struct iommu *iommu,
53 unsigned long npages, 53 unsigned long npages,
54 unsigned long *handle); 54 unsigned long *handle);
55extern void iommu_range_free(struct iommu *iommu, 55void iommu_range_free(struct iommu *iommu,
56 dma_addr_t dma_addr, 56 dma_addr_t dma_addr,
57 unsigned long npages); 57 unsigned long npages);
58 58
59#endif /* _IOMMU_COMMON_H */ 59#endif /* _IOMMU_COMMON_H */
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h
index 7c7540a62362..70a0b8ddd0ba 100644
--- a/arch/sparc/kernel/irq.h
+++ b/arch/sparc/kernel/irq.h
@@ -96,6 +96,6 @@ void sun4d_handler_irq(unsigned int pil, struct pt_regs *regs);
96/* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */ 96/* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */
97#define SUN4D_IPI_IRQ 13 97#define SUN4D_IPI_IRQ 13
98 98
99extern void sun4d_ipi_interrupt(void); 99void sun4d_ipi_interrupt(void);
100 100
101#endif 101#endif
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h
index beaba3a3860c..0ce0f96f3f1b 100644
--- a/arch/sparc/kernel/kernel.h
+++ b/arch/sparc/kernel/kernel.h
@@ -15,7 +15,7 @@ extern int ncpus_probed;
15#ifdef CONFIG_SPARC64 15#ifdef CONFIG_SPARC64
16/* setup_64.c */ 16/* setup_64.c */
17struct seq_file; 17struct seq_file;
18extern void cpucap_info(struct seq_file *); 18void cpucap_info(struct seq_file *);
19 19
20static inline unsigned long kimage_addr_to_ra(const char *p) 20static inline unsigned long kimage_addr_to_ra(const char *p)
21{ 21{
@@ -31,23 +31,23 @@ struct linux_romvec;
31void sparc32_start_kernel(struct linux_romvec *rp); 31void sparc32_start_kernel(struct linux_romvec *rp);
32 32
33/* cpu.c */ 33/* cpu.c */
34extern void cpu_probe(void); 34void cpu_probe(void);
35 35
36/* traps_32.c */ 36/* traps_32.c */
37extern void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, 37void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
38 unsigned long npc, unsigned long psr); 38 unsigned long npc, unsigned long psr);
39/* irq_32.c */ 39/* irq_32.c */
40extern struct irqaction static_irqaction[]; 40extern struct irqaction static_irqaction[];
41extern int static_irq_count; 41extern int static_irq_count;
42extern spinlock_t irq_action_lock; 42extern spinlock_t irq_action_lock;
43 43
44extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); 44void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
45extern void init_IRQ(void); 45void init_IRQ(void);
46 46
47/* sun4m_irq.c */ 47/* sun4m_irq.c */
48extern void sun4m_init_IRQ(void); 48void sun4m_init_IRQ(void);
49extern void sun4m_unmask_profile_irq(void); 49void sun4m_unmask_profile_irq(void);
50extern void sun4m_clear_profile_irq(int cpu); 50void sun4m_clear_profile_irq(int cpu);
51 51
52/* sun4m_smp.c */ 52/* sun4m_smp.c */
53void sun4m_cpu_pre_starting(void *arg); 53void sun4m_cpu_pre_starting(void *arg);
@@ -61,14 +61,14 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs);
61/* sun4d_irq.c */ 61/* sun4d_irq.c */
62extern spinlock_t sun4d_imsk_lock; 62extern spinlock_t sun4d_imsk_lock;
63 63
64extern void sun4d_init_IRQ(void); 64void sun4d_init_IRQ(void);
65extern int sun4d_request_irq(unsigned int irq, 65int sun4d_request_irq(unsigned int irq,
66 irq_handler_t handler, 66 irq_handler_t handler,
67 unsigned long irqflags, 67 unsigned long irqflags,
68 const char *devname, void *dev_id); 68 const char *devname, void *dev_id);
69extern int show_sun4d_interrupts(struct seq_file *, void *); 69int show_sun4d_interrupts(struct seq_file *, void *);
70extern void sun4d_distribute_irqs(void); 70void sun4d_distribute_irqs(void);
71extern void sun4d_free_irq(unsigned int irq, void *dev_id); 71void sun4d_free_irq(unsigned int irq, void *dev_id);
72 72
73/* sun4d_smp.c */ 73/* sun4d_smp.c */
74void sun4d_cpu_pre_starting(void *arg); 74void sun4d_cpu_pre_starting(void *arg);
@@ -102,7 +102,7 @@ extern unsigned int real_irq_entry[];
102extern unsigned int smp4d_ticker[]; 102extern unsigned int smp4d_ticker[];
103extern unsigned int patchme_maybe_smp_msg[]; 103extern unsigned int patchme_maybe_smp_msg[];
104 104
105extern void floppy_hardint(void); 105void floppy_hardint(void);
106 106
107/* trampoline_32.S */ 107/* trampoline_32.S */
108extern unsigned long sun4m_cpu_startup; 108extern unsigned long sun4m_cpu_startup;
diff --git a/arch/sparc/kernel/pci_impl.h b/arch/sparc/kernel/pci_impl.h
index 5f688531f48c..75803c780af3 100644
--- a/arch/sparc/kernel/pci_impl.h
+++ b/arch/sparc/kernel/pci_impl.h
@@ -48,8 +48,8 @@ struct sparc64_msiq_ops {
48 unsigned long devino); 48 unsigned long devino);
49}; 49};
50 50
51extern void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, 51void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
52 const struct sparc64_msiq_ops *ops); 52 const struct sparc64_msiq_ops *ops);
53 53
54struct sparc64_msiq_cookie { 54struct sparc64_msiq_cookie {
55 struct pci_pbm_info *pbm; 55 struct pci_pbm_info *pbm;
@@ -158,23 +158,23 @@ extern struct pci_pbm_info *pci_pbm_root;
158extern int pci_num_pbms; 158extern int pci_num_pbms;
159 159
160/* PCI bus scanning and fixup support. */ 160/* PCI bus scanning and fixup support. */
161extern void pci_get_pbm_props(struct pci_pbm_info *pbm); 161void pci_get_pbm_props(struct pci_pbm_info *pbm);
162extern struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm, 162struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
163 struct device *parent); 163 struct device *parent);
164extern void pci_determine_mem_io_space(struct pci_pbm_info *pbm); 164void pci_determine_mem_io_space(struct pci_pbm_info *pbm);
165 165
166/* Error reporting support. */ 166/* Error reporting support. */
167extern void pci_scan_for_target_abort(struct pci_pbm_info *, struct pci_bus *); 167void pci_scan_for_target_abort(struct pci_pbm_info *, struct pci_bus *);
168extern void pci_scan_for_master_abort(struct pci_pbm_info *, struct pci_bus *); 168void pci_scan_for_master_abort(struct pci_pbm_info *, struct pci_bus *);
169extern void pci_scan_for_parity_error(struct pci_pbm_info *, struct pci_bus *); 169void pci_scan_for_parity_error(struct pci_pbm_info *, struct pci_bus *);
170 170
171/* Configuration space access. */ 171/* Configuration space access. */
172extern void pci_config_read8(u8 *addr, u8 *ret); 172void pci_config_read8(u8 *addr, u8 *ret);
173extern void pci_config_read16(u16 *addr, u16 *ret); 173void pci_config_read16(u16 *addr, u16 *ret);
174extern void pci_config_read32(u32 *addr, u32 *ret); 174void pci_config_read32(u32 *addr, u32 *ret);
175extern void pci_config_write8(u8 *addr, u8 val); 175void pci_config_write8(u8 *addr, u8 val);
176extern void pci_config_write16(u16 *addr, u16 val); 176void pci_config_write16(u16 *addr, u16 val);
177extern void pci_config_write32(u32 *addr, u32 val); 177void pci_config_write32(u32 *addr, u32 val);
178 178
179extern struct pci_ops sun4u_pci_ops; 179extern struct pci_ops sun4u_pci_ops;
180extern struct pci_ops sun4v_pci_ops; 180extern struct pci_ops sun4v_pci_ops;
diff --git a/arch/sparc/kernel/pci_sun4v.h b/arch/sparc/kernel/pci_sun4v.h
index 8e9fc3a5b4f5..5642212390b2 100644
--- a/arch/sparc/kernel/pci_sun4v.h
+++ b/arch/sparc/kernel/pci_sun4v.h
@@ -6,87 +6,87 @@
6#ifndef _PCI_SUN4V_H 6#ifndef _PCI_SUN4V_H
7#define _PCI_SUN4V_H 7#define _PCI_SUN4V_H
8 8
9extern long pci_sun4v_iommu_map(unsigned long devhandle, 9long pci_sun4v_iommu_map(unsigned long devhandle,
10 unsigned long tsbid, 10 unsigned long tsbid,
11 unsigned long num_ttes, 11 unsigned long num_ttes,
12 unsigned long io_attributes, 12 unsigned long io_attributes,
13 unsigned long io_page_list_pa); 13 unsigned long io_page_list_pa);
14extern unsigned long pci_sun4v_iommu_demap(unsigned long devhandle, 14unsigned long pci_sun4v_iommu_demap(unsigned long devhandle,
15 unsigned long tsbid, 15 unsigned long tsbid,
16 unsigned long num_ttes); 16 unsigned long num_ttes);
17extern unsigned long pci_sun4v_iommu_getmap(unsigned long devhandle, 17unsigned long pci_sun4v_iommu_getmap(unsigned long devhandle,
18 unsigned long tsbid, 18 unsigned long tsbid,
19 unsigned long *io_attributes, 19 unsigned long *io_attributes,
20 unsigned long *real_address); 20 unsigned long *real_address);
21extern unsigned long pci_sun4v_config_get(unsigned long devhandle, 21unsigned long pci_sun4v_config_get(unsigned long devhandle,
22 unsigned long pci_device, 22 unsigned long pci_device,
23 unsigned long config_offset, 23 unsigned long config_offset,
24 unsigned long size); 24 unsigned long size);
25extern int pci_sun4v_config_put(unsigned long devhandle, 25int pci_sun4v_config_put(unsigned long devhandle,
26 unsigned long pci_device, 26 unsigned long pci_device,
27 unsigned long config_offset, 27 unsigned long config_offset,
28 unsigned long size, 28 unsigned long size,
29 unsigned long data); 29 unsigned long data);
30 30
31extern unsigned long pci_sun4v_msiq_conf(unsigned long devhandle, 31unsigned long pci_sun4v_msiq_conf(unsigned long devhandle,
32 unsigned long msiqid, 32 unsigned long msiqid,
33 unsigned long msiq_paddr, 33 unsigned long msiq_paddr,
34 unsigned long num_entries); 34 unsigned long num_entries);
35extern unsigned long pci_sun4v_msiq_info(unsigned long devhandle, 35unsigned long pci_sun4v_msiq_info(unsigned long devhandle,
36 unsigned long msiqid, 36 unsigned long msiqid,
37 unsigned long *msiq_paddr, 37 unsigned long *msiq_paddr,
38 unsigned long *num_entries); 38 unsigned long *num_entries);
39extern unsigned long pci_sun4v_msiq_getvalid(unsigned long devhandle, 39unsigned long pci_sun4v_msiq_getvalid(unsigned long devhandle,
40 unsigned long msiqid, 40 unsigned long msiqid,
41 unsigned long *valid); 41 unsigned long *valid);
42extern unsigned long pci_sun4v_msiq_setvalid(unsigned long devhandle, 42unsigned long pci_sun4v_msiq_setvalid(unsigned long devhandle,
43 unsigned long msiqid, 43 unsigned long msiqid,
44 unsigned long valid); 44 unsigned long valid);
45extern unsigned long pci_sun4v_msiq_getstate(unsigned long devhandle, 45unsigned long pci_sun4v_msiq_getstate(unsigned long devhandle,
46 unsigned long msiqid, 46 unsigned long msiqid,
47 unsigned long *state); 47 unsigned long *state);
48extern unsigned long pci_sun4v_msiq_setstate(unsigned long devhandle, 48unsigned long pci_sun4v_msiq_setstate(unsigned long devhandle,
49 unsigned long msiqid, 49 unsigned long msiqid,
50 unsigned long state); 50 unsigned long state);
51extern unsigned long pci_sun4v_msiq_gethead(unsigned long devhandle, 51unsigned long pci_sun4v_msiq_gethead(unsigned long devhandle,
52 unsigned long msiqid, 52 unsigned long msiqid,
53 unsigned long *head); 53 unsigned long *head);
54extern unsigned long pci_sun4v_msiq_sethead(unsigned long devhandle, 54unsigned long pci_sun4v_msiq_sethead(unsigned long devhandle,
55 unsigned long msiqid, 55 unsigned long msiqid,
56 unsigned long head); 56 unsigned long head);
57extern unsigned long pci_sun4v_msiq_gettail(unsigned long devhandle, 57unsigned long pci_sun4v_msiq_gettail(unsigned long devhandle,
58 unsigned long msiqid, 58 unsigned long msiqid,
59 unsigned long *head); 59 unsigned long *head);
60extern unsigned long pci_sun4v_msi_getvalid(unsigned long devhandle, 60unsigned long pci_sun4v_msi_getvalid(unsigned long devhandle,
61 unsigned long msinum, 61 unsigned long msinum,
62 unsigned long *valid); 62 unsigned long *valid);
63extern unsigned long pci_sun4v_msi_setvalid(unsigned long devhandle, 63unsigned long pci_sun4v_msi_setvalid(unsigned long devhandle,
64 unsigned long msinum, 64 unsigned long msinum,
65 unsigned long valid); 65 unsigned long valid);
66extern unsigned long pci_sun4v_msi_getmsiq(unsigned long devhandle, 66unsigned long pci_sun4v_msi_getmsiq(unsigned long devhandle,
67 unsigned long msinum, 67 unsigned long msinum,
68 unsigned long *msiq); 68 unsigned long *msiq);
69extern unsigned long pci_sun4v_msi_setmsiq(unsigned long devhandle, 69unsigned long pci_sun4v_msi_setmsiq(unsigned long devhandle,
70 unsigned long msinum, 70 unsigned long msinum,
71 unsigned long msiq, 71 unsigned long msiq,
72 unsigned long msitype); 72 unsigned long msitype);
73extern unsigned long pci_sun4v_msi_getstate(unsigned long devhandle, 73unsigned long pci_sun4v_msi_getstate(unsigned long devhandle,
74 unsigned long msinum, 74 unsigned long msinum,
75 unsigned long *state); 75 unsigned long *state);
76extern unsigned long pci_sun4v_msi_setstate(unsigned long devhandle, 76unsigned long pci_sun4v_msi_setstate(unsigned long devhandle,
77 unsigned long msinum, 77 unsigned long msinum,
78 unsigned long state); 78 unsigned long state);
79extern unsigned long pci_sun4v_msg_getmsiq(unsigned long devhandle, 79unsigned long pci_sun4v_msg_getmsiq(unsigned long devhandle,
80 unsigned long msinum, 80 unsigned long msinum,
81 unsigned long *msiq); 81 unsigned long *msiq);
82extern unsigned long pci_sun4v_msg_setmsiq(unsigned long devhandle, 82unsigned long pci_sun4v_msg_setmsiq(unsigned long devhandle,
83 unsigned long msinum, 83 unsigned long msinum,
84 unsigned long msiq); 84 unsigned long msiq);
85extern unsigned long pci_sun4v_msg_getvalid(unsigned long devhandle, 85unsigned long pci_sun4v_msg_getvalid(unsigned long devhandle,
86 unsigned long msinum, 86 unsigned long msinum,
87 unsigned long *valid); 87 unsigned long *valid);
88extern unsigned long pci_sun4v_msg_setvalid(unsigned long devhandle, 88unsigned long pci_sun4v_msg_setvalid(unsigned long devhandle,
89 unsigned long msinum, 89 unsigned long msinum,
90 unsigned long valid); 90 unsigned long valid);
91 91
92#endif /* !(_PCI_SUN4V_H) */ 92#endif /* !(_PCI_SUN4V_H) */
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
index cf5fe1c0b024..890281b12b28 100644
--- a/arch/sparc/kernel/prom.h
+++ b/arch/sparc/kernel/prom.h
@@ -4,7 +4,7 @@
4#include <linux/spinlock.h> 4#include <linux/spinlock.h>
5#include <asm/prom.h> 5#include <asm/prom.h>
6 6
7extern void of_console_init(void); 7void of_console_init(void);
8 8
9extern unsigned int prom_early_allocated; 9extern unsigned int prom_early_allocated;
10 10
diff --git a/arch/sparc/kernel/psycho_common.h b/arch/sparc/kernel/psycho_common.h
index 590b4ed8ab5e..05a6e30a928e 100644
--- a/arch/sparc/kernel/psycho_common.h
+++ b/arch/sparc/kernel/psycho_common.h
@@ -30,19 +30,19 @@ enum psycho_error_type {
30 UE_ERR, CE_ERR, PCI_ERR 30 UE_ERR, CE_ERR, PCI_ERR
31}; 31};
32 32
33extern void psycho_check_iommu_error(struct pci_pbm_info *pbm, 33void psycho_check_iommu_error(struct pci_pbm_info *pbm,
34 unsigned long afsr, 34 unsigned long afsr,
35 unsigned long afar, 35 unsigned long afar,
36 enum psycho_error_type type); 36 enum psycho_error_type type);
37 37
38extern irqreturn_t psycho_pcierr_intr(int irq, void *dev_id); 38irqreturn_t psycho_pcierr_intr(int irq, void *dev_id);
39 39
40extern int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize, 40int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize,
41 u32 dvma_offset, u32 dma_mask, 41 u32 dvma_offset, u32 dma_mask,
42 unsigned long write_complete_offset); 42 unsigned long write_complete_offset);
43 43
44extern void psycho_pbm_init_common(struct pci_pbm_info *pbm, 44void psycho_pbm_init_common(struct pci_pbm_info *pbm,
45 struct platform_device *op, 45 struct platform_device *op,
46 const char *chip_name, int chip_type); 46 const char *chip_name, int chip_type);
47 47
48#endif /* _PSYCHO_COMMON_H */ 48#endif /* _PSYCHO_COMMON_H */
diff --git a/arch/sparc/mm/init_64.h b/arch/sparc/mm/init_64.h
index 5d3782deb403..0668b364f44d 100644
--- a/arch/sparc/mm/init_64.h
+++ b/arch/sparc/mm/init_64.h
@@ -21,7 +21,7 @@ extern unsigned int sparc64_highest_unlocked_tlb_ent;
21extern unsigned long sparc64_kern_pri_context; 21extern unsigned long sparc64_kern_pri_context;
22extern unsigned long sparc64_kern_pri_nuc_bits; 22extern unsigned long sparc64_kern_pri_nuc_bits;
23extern unsigned long sparc64_kern_sec_context; 23extern unsigned long sparc64_kern_sec_context;
24extern void mmu_info(struct seq_file *m); 24void mmu_info(struct seq_file *m);
25 25
26struct linux_prom_translation { 26struct linux_prom_translation {
27 unsigned long virt; 27 unsigned long virt;
@@ -36,7 +36,7 @@ extern unsigned int prom_trans_ents;
36/* Exported for SMP bootup purposes. */ 36/* Exported for SMP bootup purposes. */
37extern unsigned long kern_locked_tte_data; 37extern unsigned long kern_locked_tte_data;
38 38
39extern void prom_world(int enter); 39void prom_world(int enter);
40 40
41#ifdef CONFIG_SPARSEMEM_VMEMMAP 41#ifdef CONFIG_SPARSEMEM_VMEMMAP
42#define VMEMMAP_CHUNK_SHIFT 22 42#define VMEMMAP_CHUNK_SHIFT 22