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/module.h>
14 #include <linux/types.h>
15 #include <linux/string.h>
16 #include <linux/sched.h>
17 #include <linux/in6.h>
18 #include <linux/pci.h>
19 #include <linux/interrupt.h>
20 #include <linux/fs_struct.h>
23 #include <linux/socket.h>
24 #include <linux/syscalls.h>
25 #include <linux/percpu.h>
26 #include <linux/init.h>
27 #include <net/compat.h>
29 #include <asm/oplib.h>
30 #include <asm/delay.h>
31 #include <asm/system.h>
32 #include <asm/auxio.h>
33 #include <asm/pgtable.h>
36 #include <asm/idprom.h>
41 #include <asm/mostek.h>
42 #include <asm/ptrace.h>
44 #include <asm/uaccess.h>
45 #include <asm/checksum.h>
46 #include <asm/fpumacro.h>
47 #include <asm/pgalloc.h>
48 #include <asm/cacheflush.h>
57 #include <asm/a.out.h>
58 #include <asm/ns87303.h>
59 #include <asm/timer.h>
60 #include <asm/cpudata.h>
61 #include <asm/rwsem.h>
69 extern void die_if_kernel(char *str
, struct pt_regs
*regs
);
70 extern pid_t
kernel_thread(int (*fn
)(void *), void * arg
, unsigned long flags
);
71 extern void *__bzero(void *, size_t);
72 extern void *__memscan_zero(void *, size_t);
73 extern void *__memscan_generic(void *, int, size_t);
74 extern int __memcmp(const void *, const void *, __kernel_size_t
);
75 extern __kernel_size_t
strlen(const char *);
76 extern void linux_sparc_syscall(void);
77 extern void rtrap(void);
78 extern void show_regs(struct pt_regs
*);
79 extern void solaris_syscall(void);
80 extern void syscall_trace(struct pt_regs
*, int);
81 extern u32 sunos_sys_table
[], sys_call_table32
[];
82 extern void tl0_solaris(void);
83 extern void sys_sigsuspend(void);
84 extern int svr4_getcontext(svr4_ucontext_t
*uc
, struct pt_regs
*regs
);
85 extern int svr4_setcontext(svr4_ucontext_t
*uc
, struct pt_regs
*regs
);
86 extern int compat_sys_ioctl(unsigned int fd
, unsigned int cmd
, u32 arg
);
87 extern int (*handle_mathemu
)(struct pt_regs
*, struct fpustate
*);
88 extern long sparc32_open(const char __user
* filename
, int flags
, int mode
);
89 extern int io_remap_pfn_range(struct vm_area_struct
*vma
, unsigned long from
,
90 unsigned long pfn
, unsigned long size
, pgprot_t prot
);
91 extern void (*prom_palette
)(int);
93 extern int __ashrdi3(int, int);
95 extern int dump_fpu (struct pt_regs
* regs
, elf_fpregset_t
* fpregs
);
97 extern unsigned int sys_call_table
[];
99 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
100 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
102 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
103 unsigned long *, unsigned long *);
104 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
105 unsigned long *, unsigned long *, unsigned long *);
107 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
108 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
110 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
111 unsigned long *, unsigned long *);
112 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
113 unsigned long *, unsigned long *, unsigned long *);
115 /* Per-CPU information table */
116 EXPORT_PER_CPU_SYMBOL(__cpu_data
);
118 /* used by various drivers */
120 /* Out of line rw-locking implementation. */
121 EXPORT_SYMBOL(__read_lock
);
122 EXPORT_SYMBOL(__read_unlock
);
123 EXPORT_SYMBOL(__write_lock
);
124 EXPORT_SYMBOL(__write_unlock
);
125 EXPORT_SYMBOL(__write_trylock
);
127 /* CPU online map and active count. */
128 EXPORT_SYMBOL(cpu_online_map
);
129 EXPORT_SYMBOL(phys_cpu_present_map
);
131 EXPORT_SYMBOL(smp_call_function
);
132 #endif /* CONFIG_SMP */
134 #if defined(CONFIG_MCOUNT)
135 extern void _mcount(void);
136 EXPORT_SYMBOL(_mcount
);
139 EXPORT_SYMBOL(sparc64_get_clock_tick
);
143 EXPORT_SYMBOL(down_trylock
);
144 EXPORT_SYMBOL(down_interruptible
);
148 EXPORT_SYMBOL(__down_read
);
149 EXPORT_SYMBOL(__down_read_trylock
);
150 EXPORT_SYMBOL(__down_write
);
151 EXPORT_SYMBOL(__down_write_trylock
);
152 EXPORT_SYMBOL(__up_read
);
153 EXPORT_SYMBOL(__up_write
);
154 EXPORT_SYMBOL(__downgrade_write
);
156 /* Atomic counter implementation. */
157 EXPORT_SYMBOL(atomic_add
);
158 EXPORT_SYMBOL(atomic_add_ret
);
159 EXPORT_SYMBOL(atomic_sub
);
160 EXPORT_SYMBOL(atomic_sub_ret
);
161 EXPORT_SYMBOL(atomic64_add
);
162 EXPORT_SYMBOL(atomic64_add_ret
);
163 EXPORT_SYMBOL(atomic64_sub
);
164 EXPORT_SYMBOL(atomic64_sub_ret
);
166 /* Atomic bit operations. */
167 EXPORT_SYMBOL(test_and_set_bit
);
168 EXPORT_SYMBOL(test_and_clear_bit
);
169 EXPORT_SYMBOL(test_and_change_bit
);
170 EXPORT_SYMBOL(set_bit
);
171 EXPORT_SYMBOL(clear_bit
);
172 EXPORT_SYMBOL(change_bit
);
174 EXPORT_SYMBOL(__flushw_user
);
176 EXPORT_SYMBOL(tlb_type
);
177 EXPORT_SYMBOL(get_fb_unmapped_area
);
178 EXPORT_SYMBOL(flush_icache_range
);
180 EXPORT_SYMBOL(flush_dcache_page
);
181 #ifdef DCACHE_ALIASING_POSSIBLE
182 EXPORT_SYMBOL(__flush_dcache_range
);
185 EXPORT_SYMBOL(mostek_lock
);
186 EXPORT_SYMBOL(mstk48t02_regs
);
187 #ifdef CONFIG_SUN_AUXIO
188 EXPORT_SYMBOL(auxio_set_led
);
189 EXPORT_SYMBOL(auxio_set_lte
);
192 EXPORT_SYMBOL(sbus_root
);
193 EXPORT_SYMBOL(dma_chain
);
194 EXPORT_SYMBOL(sbus_set_sbus64
);
195 EXPORT_SYMBOL(sbus_alloc_consistent
);
196 EXPORT_SYMBOL(sbus_free_consistent
);
197 EXPORT_SYMBOL(sbus_map_single
);
198 EXPORT_SYMBOL(sbus_unmap_single
);
199 EXPORT_SYMBOL(sbus_map_sg
);
200 EXPORT_SYMBOL(sbus_unmap_sg
);
201 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu
);
202 EXPORT_SYMBOL(sbus_dma_sync_single_for_device
);
203 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu
);
204 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device
);
206 EXPORT_SYMBOL(outsb
);
207 EXPORT_SYMBOL(outsw
);
208 EXPORT_SYMBOL(outsl
);
213 EXPORT_SYMBOL(ebus_chain
);
214 EXPORT_SYMBOL(isa_chain
);
215 EXPORT_SYMBOL(pci_memspace_mask
);
216 EXPORT_SYMBOL(pci_alloc_consistent
);
217 EXPORT_SYMBOL(pci_free_consistent
);
218 EXPORT_SYMBOL(pci_map_single
);
219 EXPORT_SYMBOL(pci_unmap_single
);
220 EXPORT_SYMBOL(pci_map_sg
);
221 EXPORT_SYMBOL(pci_unmap_sg
);
222 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu
);
223 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu
);
224 EXPORT_SYMBOL(pci_dma_supported
);
227 /* I/O device mmaping on Sparc64. */
228 EXPORT_SYMBOL(io_remap_pfn_range
);
231 /* Solaris/SunOS binary compatibility */
232 EXPORT_SYMBOL(verify_compat_iovec
);
235 EXPORT_SYMBOL(dump_fpu
);
236 EXPORT_SYMBOL(put_fs_struct
);
238 /* math-emu wants this */
239 EXPORT_SYMBOL(die_if_kernel
);
241 /* Kernel thread creation. */
242 EXPORT_SYMBOL(kernel_thread
);
245 EXPORT_SYMBOL(idprom
);
246 EXPORT_SYMBOL(prom_root_node
);
247 EXPORT_SYMBOL(prom_getchild
);
248 EXPORT_SYMBOL(prom_getsibling
);
249 EXPORT_SYMBOL(prom_searchsiblings
);
250 EXPORT_SYMBOL(prom_firstprop
);
251 EXPORT_SYMBOL(prom_nextprop
);
252 EXPORT_SYMBOL(prom_getproplen
);
253 EXPORT_SYMBOL(prom_getproperty
);
254 EXPORT_SYMBOL(prom_node_has_property
);
255 EXPORT_SYMBOL(prom_setprop
);
256 EXPORT_SYMBOL(saved_command_line
);
257 EXPORT_SYMBOL(prom_finddevice
);
258 EXPORT_SYMBOL(prom_feval
);
259 EXPORT_SYMBOL(prom_getbool
);
260 EXPORT_SYMBOL(prom_getstring
);
261 EXPORT_SYMBOL(prom_getint
);
262 EXPORT_SYMBOL(prom_getintdefault
);
263 EXPORT_SYMBOL(__prom_getchild
);
264 EXPORT_SYMBOL(__prom_getsibling
);
266 /* sparc library symbols */
267 EXPORT_SYMBOL(strlen
);
268 EXPORT_SYMBOL(__strlen_user
);
269 EXPORT_SYMBOL(__strnlen_user
);
271 #ifdef CONFIG_SOLARIS_EMUL_MODULE
272 EXPORT_SYMBOL(linux_sparc_syscall
);
273 EXPORT_SYMBOL(rtrap
);
274 EXPORT_SYMBOL(show_regs
);
275 EXPORT_SYMBOL(solaris_syscall
);
276 EXPORT_SYMBOL(syscall_trace
);
277 EXPORT_SYMBOL(sunos_sys_table
);
278 EXPORT_SYMBOL(sys_call_table32
);
279 EXPORT_SYMBOL(tl0_solaris
);
280 EXPORT_SYMBOL(sys_sigsuspend
);
281 EXPORT_SYMBOL(sys_getppid
);
282 EXPORT_SYMBOL(sys_getpid
);
283 EXPORT_SYMBOL(sys_geteuid
);
284 EXPORT_SYMBOL(sys_getuid
);
285 EXPORT_SYMBOL(sys_getegid
);
286 EXPORT_SYMBOL(sys_getgid
);
287 EXPORT_SYMBOL(svr4_getcontext
);
288 EXPORT_SYMBOL(svr4_setcontext
);
289 EXPORT_SYMBOL(compat_sys_ioctl
);
290 EXPORT_SYMBOL(sparc32_open
);
293 /* Special internal versions of library functions. */
294 EXPORT_SYMBOL(_clear_page
);
295 EXPORT_SYMBOL(clear_user_page
);
296 EXPORT_SYMBOL(copy_user_page
);
297 EXPORT_SYMBOL(__bzero
);
298 EXPORT_SYMBOL(__memscan_zero
);
299 EXPORT_SYMBOL(__memscan_generic
);
300 EXPORT_SYMBOL(__memcmp
);
301 EXPORT_SYMBOL(__memset
);
303 EXPORT_SYMBOL(csum_partial
);
304 EXPORT_SYMBOL(csum_partial_copy_nocheck
);
305 EXPORT_SYMBOL(__csum_partial_copy_from_user
);
306 EXPORT_SYMBOL(__csum_partial_copy_to_user
);
307 EXPORT_SYMBOL(ip_fast_csum
);
309 /* Moving data to/from/in userspace. */
310 EXPORT_SYMBOL(___copy_to_user
);
311 EXPORT_SYMBOL(___copy_from_user
);
312 EXPORT_SYMBOL(___copy_in_user
);
313 EXPORT_SYMBOL(copy_to_user_fixup
);
314 EXPORT_SYMBOL(copy_from_user_fixup
);
315 EXPORT_SYMBOL(copy_in_user_fixup
);
316 EXPORT_SYMBOL(__strncpy_from_user
);
317 EXPORT_SYMBOL(__clear_user
);
319 /* Various address conversion macros use this. */
320 EXPORT_SYMBOL(sparc64_valid_addr_bitmap
);
322 /* No version information on this, heavily used in inline asm,
323 * and will always be 'void __ret_efault(void)'.
325 EXPORT_SYMBOL(__ret_efault
);
327 /* No version information on these, as gcc produces such symbols. */
328 EXPORT_SYMBOL(memcmp
);
329 EXPORT_SYMBOL(memcpy
);
330 EXPORT_SYMBOL(memset
);
331 EXPORT_SYMBOL(memmove
);
332 EXPORT_SYMBOL(strncmp
);
334 /* Delay routines. */
335 EXPORT_SYMBOL(__udelay
);
336 EXPORT_SYMBOL(__ndelay
);
337 EXPORT_SYMBOL(__const_udelay
);
338 EXPORT_SYMBOL(__delay
);
341 /* RAID code needs this */
342 EXPORT_SYMBOL(VISenter
);
344 /* for input/keybdev */
345 EXPORT_SYMBOL(sun_do_break
);
346 EXPORT_SYMBOL(serial_console
);
347 EXPORT_SYMBOL(stop_a_enabled
);
349 #ifdef CONFIG_DEBUG_BUGVERBOSE
350 EXPORT_SYMBOL(do_BUG
);
354 EXPORT_SYMBOL(ns87303_lock
);
356 /* for solaris compat module */
357 EXPORT_SYMBOL_GPL(sys_call_table
);
359 EXPORT_SYMBOL(tick_ops
);
361 EXPORT_SYMBOL(xor_vis_2
);
362 EXPORT_SYMBOL(xor_vis_3
);
363 EXPORT_SYMBOL(xor_vis_4
);
364 EXPORT_SYMBOL(xor_vis_5
);
366 EXPORT_SYMBOL(xor_niagara_2
);
367 EXPORT_SYMBOL(xor_niagara_3
);
368 EXPORT_SYMBOL(xor_niagara_4
);
369 EXPORT_SYMBOL(xor_niagara_5
);
371 EXPORT_SYMBOL(prom_palette
);