]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/sparc64/kernel/sparc64_ksyms.c
Pull sbs into release branch
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / sparc64_ksyms.c
1 /* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
2  *
3  * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
4  * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
5  * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
6  */
7
8 /* Tell string.h we don't want memcpy etc. as cpp defines */
9 #define EXPORT_SYMTAB_STROPS
10 #define PROMLIB_INTERNAL
11
12 #include <linux/module.h>
13 #include <linux/types.h>
14 #include <linux/string.h>
15 #include <linux/sched.h>
16 #include <linux/in6.h>
17 #include <linux/pci.h>
18 #include <linux/interrupt.h>
19 #include <linux/fs_struct.h>
20 #include <linux/fs.h>
21 #include <linux/mm.h>
22 #include <linux/socket.h>
23 #include <linux/syscalls.h>
24 #include <linux/percpu.h>
25 #include <linux/init.h>
26 #include <linux/rwsem.h>
27 #include <net/compat.h>
28
29 #include <asm/oplib.h>
30 #include <asm/system.h>
31 #include <asm/auxio.h>
32 #include <asm/pgtable.h>
33 #include <asm/io.h>
34 #include <asm/irq.h>
35 #include <asm/idprom.h>
36 #include <asm/svr4.h>
37 #include <asm/elf.h>
38 #include <asm/head.h>
39 #include <asm/smp.h>
40 #include <asm/mostek.h>
41 #include <asm/ptrace.h>
42 #include <asm/user.h>
43 #include <asm/uaccess.h>
44 #include <asm/checksum.h>
45 #include <asm/fpumacro.h>
46 #include <asm/pgalloc.h>
47 #include <asm/cacheflush.h>
48 #ifdef CONFIG_SBUS
49 #include <asm/sbus.h>
50 #include <asm/dma.h>
51 #endif
52 #ifdef CONFIG_PCI
53 #include <asm/ebus.h>
54 #include <asm/isa.h>
55 #endif
56 #include <asm/a.out.h>
57 #include <asm/ns87303.h>
58 #include <asm/timer.h>
59 #include <asm/cpudata.h>
60
61 struct poll {
62         int fd;
63         short events;
64         short revents;
65 };
66
67 extern void die_if_kernel(char *str, struct pt_regs *regs);
68 extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
69 extern void *__bzero(void *, size_t);
70 extern void *__memscan_zero(void *, size_t);
71 extern void *__memscan_generic(void *, int, size_t);
72 extern int __memcmp(const void *, const void *, __kernel_size_t);
73 extern __kernel_size_t strlen(const char *);
74 extern void linux_sparc_syscall(void);
75 extern void rtrap(void);
76 extern void show_regs(struct pt_regs *);
77 extern void solaris_syscall(void);
78 extern void syscall_trace(struct pt_regs *, int);
79 extern u32 sunos_sys_table[], sys_call_table32[];
80 extern void tl0_solaris(void);
81 extern void sys_sigsuspend(void);
82 extern int svr4_getcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
83 extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
84 extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
85 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
86 extern long sparc32_open(const char __user * filename, int flags, int mode);
87 extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
88         unsigned long pfn, unsigned long size, pgprot_t prot);
89 extern void (*prom_palette)(int);
90
91 extern int __ashrdi3(int, int);
92
93 extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
94
95 extern unsigned int sys_call_table[];
96
97 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
98 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
99                       unsigned long *);
100 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
101                       unsigned long *, unsigned long *);
102 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
103                       unsigned long *, unsigned long *, unsigned long *);
104
105 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
106 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
107                           unsigned long *);
108 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
109                           unsigned long *, unsigned long *);
110 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
111                           unsigned long *, unsigned long *, unsigned long *);
112
113 /* Per-CPU information table */
114 EXPORT_PER_CPU_SYMBOL(__cpu_data);
115
116 /* used by various drivers */
117 #ifdef CONFIG_SMP
118 /* Out of line rw-locking implementation. */
119 EXPORT_SYMBOL(__read_lock);
120 EXPORT_SYMBOL(__read_unlock);
121 EXPORT_SYMBOL(__write_lock);
122 EXPORT_SYMBOL(__write_unlock);
123 EXPORT_SYMBOL(__write_trylock);
124
125 EXPORT_SYMBOL(smp_call_function);
126 #endif /* CONFIG_SMP */
127
128 #if defined(CONFIG_MCOUNT)
129 extern void _mcount(void);
130 EXPORT_SYMBOL(_mcount);
131 #endif
132
133 EXPORT_SYMBOL(sparc64_get_clock_tick);
134
135 /* semaphores */
136 EXPORT_SYMBOL(down);
137 EXPORT_SYMBOL(down_trylock);
138 EXPORT_SYMBOL(down_interruptible);
139 EXPORT_SYMBOL(up);
140
141 /* RW semaphores */
142 EXPORT_SYMBOL(__down_read);
143 EXPORT_SYMBOL(__down_read_trylock);
144 EXPORT_SYMBOL(__down_write);
145 EXPORT_SYMBOL(__down_write_trylock);
146 EXPORT_SYMBOL(__up_read);
147 EXPORT_SYMBOL(__up_write);
148 EXPORT_SYMBOL(__downgrade_write);
149
150 /* Atomic counter implementation. */
151 EXPORT_SYMBOL(atomic_add);
152 EXPORT_SYMBOL(atomic_add_ret);
153 EXPORT_SYMBOL(atomic_sub);
154 EXPORT_SYMBOL(atomic_sub_ret);
155 EXPORT_SYMBOL(atomic64_add);
156 EXPORT_SYMBOL(atomic64_add_ret);
157 EXPORT_SYMBOL(atomic64_sub);
158 EXPORT_SYMBOL(atomic64_sub_ret);
159
160 /* Atomic bit operations. */
161 EXPORT_SYMBOL(test_and_set_bit);
162 EXPORT_SYMBOL(test_and_clear_bit);
163 EXPORT_SYMBOL(test_and_change_bit);
164 EXPORT_SYMBOL(set_bit);
165 EXPORT_SYMBOL(clear_bit);
166 EXPORT_SYMBOL(change_bit);
167
168 EXPORT_SYMBOL(__flushw_user);
169
170 EXPORT_SYMBOL(tlb_type);
171 EXPORT_SYMBOL(get_fb_unmapped_area);
172 EXPORT_SYMBOL(flush_icache_range);
173
174 EXPORT_SYMBOL(flush_dcache_page);
175 #ifdef DCACHE_ALIASING_POSSIBLE
176 EXPORT_SYMBOL(__flush_dcache_range);
177 #endif
178
179 EXPORT_SYMBOL(mostek_lock);
180 EXPORT_SYMBOL(mstk48t02_regs);
181 #ifdef CONFIG_SUN_AUXIO
182 EXPORT_SYMBOL(auxio_set_led);
183 EXPORT_SYMBOL(auxio_set_lte);
184 #endif
185 #ifdef CONFIG_SBUS
186 EXPORT_SYMBOL(sbus_root);
187 EXPORT_SYMBOL(dma_chain);
188 EXPORT_SYMBOL(sbus_set_sbus64);
189 EXPORT_SYMBOL(sbus_alloc_consistent);
190 EXPORT_SYMBOL(sbus_free_consistent);
191 EXPORT_SYMBOL(sbus_map_single);
192 EXPORT_SYMBOL(sbus_unmap_single);
193 EXPORT_SYMBOL(sbus_map_sg);
194 EXPORT_SYMBOL(sbus_unmap_sg);
195 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
196 EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
197 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
198 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
199 #endif
200 EXPORT_SYMBOL(outsb);
201 EXPORT_SYMBOL(outsw);
202 EXPORT_SYMBOL(outsl);
203 EXPORT_SYMBOL(insb);
204 EXPORT_SYMBOL(insw);
205 EXPORT_SYMBOL(insl);
206 #ifdef CONFIG_PCI
207 EXPORT_SYMBOL(ebus_chain);
208 EXPORT_SYMBOL(isa_chain);
209 EXPORT_SYMBOL(pci_alloc_consistent);
210 EXPORT_SYMBOL(pci_free_consistent);
211 EXPORT_SYMBOL(pci_map_single);
212 EXPORT_SYMBOL(pci_unmap_single);
213 EXPORT_SYMBOL(pci_map_sg);
214 EXPORT_SYMBOL(pci_unmap_sg);
215 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
216 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
217 EXPORT_SYMBOL(pci_dma_supported);
218 #endif
219
220 /* I/O device mmaping on Sparc64. */
221 EXPORT_SYMBOL(io_remap_pfn_range);
222
223 #ifdef CONFIG_COMPAT
224 /* Solaris/SunOS binary compatibility */
225 EXPORT_SYMBOL(verify_compat_iovec);
226 #endif
227
228 EXPORT_SYMBOL(dump_fpu);
229 EXPORT_SYMBOL(put_fs_struct);
230
231 /* math-emu wants this */
232 EXPORT_SYMBOL(die_if_kernel);
233
234 /* Kernel thread creation. */
235 EXPORT_SYMBOL(kernel_thread);
236
237 /* prom symbols */
238 EXPORT_SYMBOL(idprom);
239 EXPORT_SYMBOL(prom_root_node);
240 EXPORT_SYMBOL(prom_getchild);
241 EXPORT_SYMBOL(prom_getsibling);
242 EXPORT_SYMBOL(prom_searchsiblings);
243 EXPORT_SYMBOL(prom_firstprop);
244 EXPORT_SYMBOL(prom_nextprop);
245 EXPORT_SYMBOL(prom_getproplen);
246 EXPORT_SYMBOL(prom_getproperty);
247 EXPORT_SYMBOL(prom_node_has_property);
248 EXPORT_SYMBOL(prom_setprop);
249 EXPORT_SYMBOL(saved_command_line);
250 EXPORT_SYMBOL(prom_finddevice);
251 EXPORT_SYMBOL(prom_feval);
252 EXPORT_SYMBOL(prom_getbool);
253 EXPORT_SYMBOL(prom_getstring);
254 EXPORT_SYMBOL(prom_getint);
255 EXPORT_SYMBOL(prom_getintdefault);
256 EXPORT_SYMBOL(__prom_getchild);
257 EXPORT_SYMBOL(__prom_getsibling);
258
259 /* sparc library symbols */
260 EXPORT_SYMBOL(strlen);
261 EXPORT_SYMBOL(__strlen_user);
262 EXPORT_SYMBOL(__strnlen_user);
263
264 #ifdef CONFIG_SOLARIS_EMUL_MODULE
265 EXPORT_SYMBOL(linux_sparc_syscall);
266 EXPORT_SYMBOL(rtrap);
267 EXPORT_SYMBOL(show_regs);
268 EXPORT_SYMBOL(solaris_syscall);
269 EXPORT_SYMBOL(syscall_trace);
270 EXPORT_SYMBOL(sunos_sys_table);
271 EXPORT_SYMBOL(sys_call_table32);
272 EXPORT_SYMBOL(tl0_solaris);
273 EXPORT_SYMBOL(sys_sigsuspend);
274 EXPORT_SYMBOL(sys_getppid);
275 EXPORT_SYMBOL(sys_getpid);
276 EXPORT_SYMBOL(sys_geteuid);
277 EXPORT_SYMBOL(sys_getuid);
278 EXPORT_SYMBOL(sys_getegid);
279 EXPORT_SYMBOL(sys_getgid);
280 EXPORT_SYMBOL(svr4_getcontext);
281 EXPORT_SYMBOL(svr4_setcontext);
282 EXPORT_SYMBOL(compat_sys_ioctl);
283 EXPORT_SYMBOL(sys_ioctl);
284 EXPORT_SYMBOL(sparc32_open);
285 #endif
286
287 /* Special internal versions of library functions. */
288 EXPORT_SYMBOL(_clear_page);
289 EXPORT_SYMBOL(clear_user_page);
290 EXPORT_SYMBOL(copy_user_page);
291 EXPORT_SYMBOL(__bzero);
292 EXPORT_SYMBOL(__memscan_zero);
293 EXPORT_SYMBOL(__memscan_generic);
294 EXPORT_SYMBOL(__memcmp);
295 EXPORT_SYMBOL(__memset);
296
297 EXPORT_SYMBOL(csum_partial);
298 EXPORT_SYMBOL(csum_partial_copy_nocheck);
299 EXPORT_SYMBOL(__csum_partial_copy_from_user);
300 EXPORT_SYMBOL(__csum_partial_copy_to_user);
301 EXPORT_SYMBOL(ip_fast_csum);
302
303 /* Moving data to/from/in userspace. */
304 EXPORT_SYMBOL(___copy_to_user);
305 EXPORT_SYMBOL(___copy_from_user);
306 EXPORT_SYMBOL(___copy_in_user);
307 EXPORT_SYMBOL(copy_to_user_fixup);
308 EXPORT_SYMBOL(copy_from_user_fixup);
309 EXPORT_SYMBOL(copy_in_user_fixup);
310 EXPORT_SYMBOL(__strncpy_from_user);
311 EXPORT_SYMBOL(__clear_user);
312
313 /* Various address conversion macros use this. */
314 EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
315
316 /* No version information on this, heavily used in inline asm,
317  * and will always be 'void __ret_efault(void)'.
318  */
319 EXPORT_SYMBOL(__ret_efault);
320
321 /* No version information on these, as gcc produces such symbols. */
322 EXPORT_SYMBOL(memcmp);
323 EXPORT_SYMBOL(memcpy);
324 EXPORT_SYMBOL(memset);
325 EXPORT_SYMBOL(memmove);
326 EXPORT_SYMBOL(strncmp);
327
328 void VISenter(void);
329 /* RAID code needs this */
330 EXPORT_SYMBOL(VISenter);
331
332 /* for input/keybdev */
333 EXPORT_SYMBOL(sun_do_break);
334 EXPORT_SYMBOL(stop_a_enabled);
335
336 #ifdef CONFIG_DEBUG_BUGVERBOSE
337 EXPORT_SYMBOL(do_BUG);
338 #endif
339
340 /* for ns8703 */
341 EXPORT_SYMBOL(ns87303_lock);
342
343 /* for solaris compat module */
344 EXPORT_SYMBOL_GPL(sys_call_table);
345
346 EXPORT_SYMBOL(tick_ops);
347
348 EXPORT_SYMBOL(xor_vis_2);
349 EXPORT_SYMBOL(xor_vis_3);
350 EXPORT_SYMBOL(xor_vis_4);
351 EXPORT_SYMBOL(xor_vis_5);
352
353 EXPORT_SYMBOL(xor_niagara_2);
354 EXPORT_SYMBOL(xor_niagara_3);
355 EXPORT_SYMBOL(xor_niagara_4);
356 EXPORT_SYMBOL(xor_niagara_5);
357
358 EXPORT_SYMBOL(prom_palette);