1 /* $Id: sparc64_ksyms.c,v 1.121 2002/02/09 19:49:31 davem Exp $
2 * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
9 /* Tell string.h we don't want memcpy etc. as cpp defines */
10 #define EXPORT_SYMTAB_STROPS
11 #define PROMLIB_INTERNAL
13 #include <linux/config.h>
14 #include <linux/module.h>
15 #include <linux/types.h>
16 #include <linux/string.h>
17 #include <linux/sched.h>
18 #include <linux/in6.h>
19 #include <linux/pci.h>
20 #include <linux/interrupt.h>
21 #include <linux/fs_struct.h>
24 #include <linux/socket.h>
25 #include <linux/syscalls.h>
26 #include <linux/percpu.h>
27 #include <linux/init.h>
28 #include <net/compat.h>
30 #include <asm/oplib.h>
31 #include <asm/delay.h>
32 #include <asm/system.h>
33 #include <asm/auxio.h>
34 #include <asm/pgtable.h>
37 #include <asm/idprom.h>
42 #include <asm/mostek.h>
43 #include <asm/ptrace.h>
45 #include <asm/uaccess.h>
46 #include <asm/checksum.h>
47 #include <asm/fpumacro.h>
48 #include <asm/pgalloc.h>
49 #include <asm/cacheflush.h>
58 #include <asm/a.out.h>
59 #include <asm/ns87303.h>
60 #include <asm/timer.h>
61 #include <asm/cpudata.h>
62 #include <asm/rwsem.h>
70 extern void die_if_kernel(char *str, struct pt_regs *regs);
71 extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
72 extern void *__bzero(void *, size_t);
73 extern void *__memscan_zero(void *, size_t);
74 extern void *__memscan_generic(void *, int, size_t);
75 extern int __memcmp(const void *, const void *, __kernel_size_t);
76 extern __kernel_size_t strlen(const char *);
77 extern void linux_sparc_syscall(void);
78 extern void rtrap(void);
79 extern void show_regs(struct pt_regs *);
80 extern void solaris_syscall(void);
81 extern void syscall_trace(struct pt_regs *, int);
82 extern u32 sunos_sys_table[], sys_call_table32[];
83 extern void tl0_solaris(void);
84 extern void sys_sigsuspend(void);
85 extern int svr4_getcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
86 extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
87 extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
88 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
89 extern long sparc32_open(const char __user * filename, int flags, int mode);
90 extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
91 unsigned long pfn, unsigned long size, pgprot_t prot);
92 extern void (*prom_palette)(int);
94 extern int __ashrdi3(int, int);
96 extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
98 extern unsigned int sys_call_table[];
100 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
101 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
103 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
104 unsigned long *, unsigned long *);
105 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
106 unsigned long *, unsigned long *, unsigned long *);
108 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
109 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
111 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
112 unsigned long *, unsigned long *);
113 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
114 unsigned long *, unsigned long *, unsigned long *);
116 /* Per-CPU information table */
117 EXPORT_PER_CPU_SYMBOL(__cpu_data);
119 /* used by various drivers */
121 /* Out of line rw-locking implementation. */
122 EXPORT_SYMBOL(__read_lock);
123 EXPORT_SYMBOL(__read_unlock);
124 EXPORT_SYMBOL(__write_lock);
125 EXPORT_SYMBOL(__write_unlock);
126 EXPORT_SYMBOL(__write_trylock);
128 /* Hard IRQ locking */
129 EXPORT_SYMBOL(synchronize_irq);
131 #if defined(CONFIG_MCOUNT)
132 extern void _mcount(void);
133 EXPORT_SYMBOL(_mcount);
136 /* CPU online map and active count. */
137 EXPORT_SYMBOL(cpu_online_map);
138 EXPORT_SYMBOL(phys_cpu_present_map);
140 EXPORT_SYMBOL(smp_call_function);
141 #endif /* CONFIG_SMP */
143 EXPORT_SYMBOL(sparc64_get_clock_tick);
147 EXPORT_SYMBOL(down_trylock);
148 EXPORT_SYMBOL(down_interruptible);
152 EXPORT_SYMBOL(__down_read);
153 EXPORT_SYMBOL(__down_read_trylock);
154 EXPORT_SYMBOL(__down_write);
155 EXPORT_SYMBOL(__down_write_trylock);
156 EXPORT_SYMBOL(__up_read);
157 EXPORT_SYMBOL(__up_write);
158 EXPORT_SYMBOL(__downgrade_write);
160 /* Atomic counter implementation. */
161 EXPORT_SYMBOL(atomic_add);
162 EXPORT_SYMBOL(atomic_add_ret);
163 EXPORT_SYMBOL(atomic_sub);
164 EXPORT_SYMBOL(atomic_sub_ret);
165 EXPORT_SYMBOL(atomic64_add);
166 EXPORT_SYMBOL(atomic64_add_ret);
167 EXPORT_SYMBOL(atomic64_sub);
168 EXPORT_SYMBOL(atomic64_sub_ret);
170 /* Atomic bit operations. */
171 EXPORT_SYMBOL(test_and_set_bit);
172 EXPORT_SYMBOL(test_and_clear_bit);
173 EXPORT_SYMBOL(test_and_change_bit);
174 EXPORT_SYMBOL(set_bit);
175 EXPORT_SYMBOL(clear_bit);
176 EXPORT_SYMBOL(change_bit);
178 EXPORT_SYMBOL(__flushw_user);
180 EXPORT_SYMBOL(tlb_type);
181 EXPORT_SYMBOL(get_fb_unmapped_area);
182 EXPORT_SYMBOL(flush_icache_range);
184 EXPORT_SYMBOL(flush_dcache_page);
185 #ifdef DCACHE_ALIASING_POSSIBLE
186 EXPORT_SYMBOL(__flush_dcache_range);
189 EXPORT_SYMBOL(mostek_lock);
190 EXPORT_SYMBOL(mstk48t02_regs);
191 #ifdef CONFIG_SUN_AUXIO
192 EXPORT_SYMBOL(auxio_set_led);
193 EXPORT_SYMBOL(auxio_set_lte);
196 EXPORT_SYMBOL(sbus_root);
197 EXPORT_SYMBOL(dma_chain);
198 EXPORT_SYMBOL(sbus_set_sbus64);
199 EXPORT_SYMBOL(sbus_alloc_consistent);
200 EXPORT_SYMBOL(sbus_free_consistent);
201 EXPORT_SYMBOL(sbus_map_single);
202 EXPORT_SYMBOL(sbus_unmap_single);
203 EXPORT_SYMBOL(sbus_map_sg);
204 EXPORT_SYMBOL(sbus_unmap_sg);
205 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
206 EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
207 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
208 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
210 EXPORT_SYMBOL(outsb);
211 EXPORT_SYMBOL(outsw);
212 EXPORT_SYMBOL(outsl);
217 EXPORT_SYMBOL(ebus_chain);
218 EXPORT_SYMBOL(isa_chain);
219 EXPORT_SYMBOL(pci_memspace_mask);
220 EXPORT_SYMBOL(pci_alloc_consistent);
221 EXPORT_SYMBOL(pci_free_consistent);
222 EXPORT_SYMBOL(pci_map_single);
223 EXPORT_SYMBOL(pci_unmap_single);
224 EXPORT_SYMBOL(pci_map_sg);
225 EXPORT_SYMBOL(pci_unmap_sg);
226 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
227 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
228 EXPORT_SYMBOL(pci_dma_supported);
231 /* I/O device mmaping on Sparc64. */
232 EXPORT_SYMBOL(io_remap_pfn_range);
235 /* Solaris/SunOS binary compatibility */
236 EXPORT_SYMBOL(verify_compat_iovec);
239 EXPORT_SYMBOL(dump_fpu);
240 EXPORT_SYMBOL(put_fs_struct);
242 /* math-emu wants this */
243 EXPORT_SYMBOL(die_if_kernel);
245 /* Kernel thread creation. */
246 EXPORT_SYMBOL(kernel_thread);
249 EXPORT_SYMBOL(idprom);
250 EXPORT_SYMBOL(prom_root_node);
251 EXPORT_SYMBOL(prom_getchild);
252 EXPORT_SYMBOL(prom_getsibling);
253 EXPORT_SYMBOL(prom_searchsiblings);
254 EXPORT_SYMBOL(prom_firstprop);
255 EXPORT_SYMBOL(prom_nextprop);
256 EXPORT_SYMBOL(prom_getproplen);
257 EXPORT_SYMBOL(prom_getproperty);
258 EXPORT_SYMBOL(prom_node_has_property);
259 EXPORT_SYMBOL(prom_setprop);
260 EXPORT_SYMBOL(saved_command_line);
261 EXPORT_SYMBOL(prom_getname);
262 EXPORT_SYMBOL(prom_finddevice);
263 EXPORT_SYMBOL(prom_feval);
264 EXPORT_SYMBOL(prom_getbool);
265 EXPORT_SYMBOL(prom_getstring);
266 EXPORT_SYMBOL(prom_getint);
267 EXPORT_SYMBOL(prom_getintdefault);
268 EXPORT_SYMBOL(__prom_getchild);
269 EXPORT_SYMBOL(__prom_getsibling);
271 /* sparc library symbols */
272 EXPORT_SYMBOL(strlen);
273 EXPORT_SYMBOL(__strlen_user);
274 EXPORT_SYMBOL(__strnlen_user);
276 #ifdef CONFIG_SOLARIS_EMUL_MODULE
277 EXPORT_SYMBOL(linux_sparc_syscall);
278 EXPORT_SYMBOL(rtrap);
279 EXPORT_SYMBOL(show_regs);
280 EXPORT_SYMBOL(solaris_syscall);
281 EXPORT_SYMBOL(syscall_trace);
282 EXPORT_SYMBOL(sunos_sys_table);
283 EXPORT_SYMBOL(sys_call_table32);
284 EXPORT_SYMBOL(tl0_solaris);
285 EXPORT_SYMBOL(sys_sigsuspend);
286 EXPORT_SYMBOL(sys_getppid);
287 EXPORT_SYMBOL(sys_getpid);
288 EXPORT_SYMBOL(sys_geteuid);
289 EXPORT_SYMBOL(sys_getuid);
290 EXPORT_SYMBOL(sys_getegid);
291 EXPORT_SYMBOL(sys_getgid);
292 EXPORT_SYMBOL(svr4_getcontext);
293 EXPORT_SYMBOL(svr4_setcontext);
294 EXPORT_SYMBOL(compat_sys_ioctl);
295 EXPORT_SYMBOL(sparc32_open);
298 /* Special internal versions of library functions. */
299 EXPORT_SYMBOL(_clear_page);
300 EXPORT_SYMBOL(clear_user_page);
301 EXPORT_SYMBOL(copy_user_page);
302 EXPORT_SYMBOL(__bzero);
303 EXPORT_SYMBOL(__memscan_zero);
304 EXPORT_SYMBOL(__memscan_generic);
305 EXPORT_SYMBOL(__memcmp);
306 EXPORT_SYMBOL(__memset);
308 EXPORT_SYMBOL(csum_partial);
309 EXPORT_SYMBOL(csum_partial_copy_nocheck);
310 EXPORT_SYMBOL(__csum_partial_copy_from_user);
311 EXPORT_SYMBOL(__csum_partial_copy_to_user);
312 EXPORT_SYMBOL(ip_fast_csum);
314 /* Moving data to/from/in userspace. */
315 EXPORT_SYMBOL(___copy_to_user);
316 EXPORT_SYMBOL(___copy_from_user);
317 EXPORT_SYMBOL(___copy_in_user);
318 EXPORT_SYMBOL(copy_to_user_fixup);
319 EXPORT_SYMBOL(copy_from_user_fixup);
320 EXPORT_SYMBOL(copy_in_user_fixup);
321 EXPORT_SYMBOL(__strncpy_from_user);
322 EXPORT_SYMBOL(__clear_user);
324 /* Various address conversion macros use this. */
325 EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
327 /* No version information on this, heavily used in inline asm,
328 * and will always be 'void __ret_efault(void)'.
330 EXPORT_SYMBOL(__ret_efault);
332 /* No version information on these, as gcc produces such symbols. */
333 EXPORT_SYMBOL(memcmp);
334 EXPORT_SYMBOL(memcpy);
335 EXPORT_SYMBOL(memset);
336 EXPORT_SYMBOL(memmove);
337 EXPORT_SYMBOL(strncmp);
339 /* Delay routines. */
340 EXPORT_SYMBOL(__udelay);
341 EXPORT_SYMBOL(__ndelay);
342 EXPORT_SYMBOL(__const_udelay);
343 EXPORT_SYMBOL(__delay);
346 /* RAID code needs this */
347 EXPORT_SYMBOL(VISenter);
349 /* for input/keybdev */
350 EXPORT_SYMBOL(sun_do_break);
351 EXPORT_SYMBOL(serial_console);
352 EXPORT_SYMBOL(stop_a_enabled);
354 #ifdef CONFIG_DEBUG_BUGVERBOSE
355 EXPORT_SYMBOL(do_BUG);
359 EXPORT_SYMBOL(ns87303_lock);
361 /* for solaris compat module */
362 EXPORT_SYMBOL_GPL(sys_call_table);
364 EXPORT_SYMBOL(tick_ops);
366 EXPORT_SYMBOL(xor_vis_2);
367 EXPORT_SYMBOL(xor_vis_3);
368 EXPORT_SYMBOL(xor_vis_4);
369 EXPORT_SYMBOL(xor_vis_5);
371 EXPORT_SYMBOL(xor_niagara_2);
372 EXPORT_SYMBOL(xor_niagara_3);
373 EXPORT_SYMBOL(xor_niagara_4);
374 EXPORT_SYMBOL(xor_niagara_5);
376 EXPORT_SYMBOL(prom_palette);