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 void _sigpause_common (unsigned int set
, struct pt_regs
*);
73 extern void *__bzero(void *, size_t);
74 extern void *__memscan_zero(void *, size_t);
75 extern void *__memscan_generic(void *, int, size_t);
76 extern int __memcmp(const void *, const void *, __kernel_size_t
);
77 extern __kernel_size_t
strlen(const char *);
78 extern void linux_sparc_syscall(void);
79 extern void rtrap(void);
80 extern void show_regs(struct pt_regs
*);
81 extern void solaris_syscall(void);
82 extern void syscall_trace(struct pt_regs
*, int);
83 extern u32 sunos_sys_table
[], sys_call_table32
[];
84 extern void tl0_solaris(void);
85 extern void sys_sigsuspend(void);
86 extern int svr4_getcontext(svr4_ucontext_t
*uc
, struct pt_regs
*regs
);
87 extern int svr4_setcontext(svr4_ucontext_t
*uc
, struct pt_regs
*regs
);
88 extern int compat_sys_ioctl(unsigned int fd
, unsigned int cmd
, u32 arg
);
89 extern int (*handle_mathemu
)(struct pt_regs
*, struct fpustate
*);
90 extern long sparc32_open(const char __user
* filename
, int flags
, int mode
);
91 extern int io_remap_page_range(struct vm_area_struct
*vma
, unsigned long from
,
92 unsigned long offset
, unsigned long size
, pgprot_t prot
, int space
);
93 extern int io_remap_pfn_range(struct vm_area_struct
*vma
, unsigned long from
,
94 unsigned long pfn
, unsigned long size
, pgprot_t prot
);
95 extern void (*prom_palette
)(int);
97 extern int __ashrdi3(int, int);
99 extern void dump_thread(struct pt_regs
*, struct user
*);
100 extern int dump_fpu (struct pt_regs
* regs
, elf_fpregset_t
* fpregs
);
102 #if defined(CONFIG_SMP) && defined(CONFIG_DEBUG_SPINLOCK)
103 extern void _do_spin_lock (spinlock_t
*lock
, char *str
);
104 extern void _do_spin_unlock (spinlock_t
*lock
);
105 extern int _spin_trylock (spinlock_t
*lock
);
106 extern void _do_read_lock(rwlock_t
*rw
, char *str
);
107 extern void _do_read_unlock(rwlock_t
*rw
, char *str
);
108 extern void _do_write_lock(rwlock_t
*rw
, char *str
);
109 extern void _do_write_unlock(rwlock_t
*rw
);
110 extern int _do_write_trylock(rwlock_t
*rw
, char *str
);
113 extern unsigned long phys_base
;
114 extern unsigned long pfn_base
;
116 extern unsigned int sys_call_table
[];
118 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
119 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
121 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
122 unsigned long *, unsigned long *);
123 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
124 unsigned long *, unsigned long *, unsigned long *);
126 /* Per-CPU information table */
127 EXPORT_PER_CPU_SYMBOL(__cpu_data
);
129 /* used by various drivers */
131 #ifndef CONFIG_DEBUG_SPINLOCK
132 /* Out of line rw-locking implementation. */
133 EXPORT_SYMBOL(__read_lock
);
134 EXPORT_SYMBOL(__read_unlock
);
135 EXPORT_SYMBOL(__write_lock
);
136 EXPORT_SYMBOL(__write_unlock
);
137 EXPORT_SYMBOL(__write_trylock
);
138 /* Out of line spin-locking implementation. */
139 EXPORT_SYMBOL(_raw_spin_lock
);
140 EXPORT_SYMBOL(_raw_spin_lock_flags
);
143 /* Hard IRQ locking */
144 EXPORT_SYMBOL(synchronize_irq
);
146 #if defined(CONFIG_MCOUNT)
147 extern void _mcount(void);
148 EXPORT_SYMBOL(_mcount
);
151 /* CPU online map and active count. */
152 EXPORT_SYMBOL(cpu_online_map
);
153 EXPORT_SYMBOL(phys_cpu_present_map
);
155 /* Spinlock debugging library, optional. */
156 #ifdef CONFIG_DEBUG_SPINLOCK
157 EXPORT_SYMBOL(_do_spin_lock
);
158 EXPORT_SYMBOL(_do_spin_unlock
);
159 EXPORT_SYMBOL(_spin_trylock
);
160 EXPORT_SYMBOL(_do_read_lock
);
161 EXPORT_SYMBOL(_do_read_unlock
);
162 EXPORT_SYMBOL(_do_write_lock
);
163 EXPORT_SYMBOL(_do_write_unlock
);
164 EXPORT_SYMBOL(_do_write_trylock
);
167 EXPORT_SYMBOL(smp_call_function
);
168 #endif /* CONFIG_SMP */
170 EXPORT_SYMBOL(sparc64_get_clock_tick
);
174 EXPORT_SYMBOL(down_trylock
);
175 EXPORT_SYMBOL(down_interruptible
);
179 EXPORT_SYMBOL(__down_read
);
180 EXPORT_SYMBOL(__down_read_trylock
);
181 EXPORT_SYMBOL(__down_write
);
182 EXPORT_SYMBOL(__down_write_trylock
);
183 EXPORT_SYMBOL(__up_read
);
184 EXPORT_SYMBOL(__up_write
);
185 EXPORT_SYMBOL(__downgrade_write
);
187 /* Atomic counter implementation. */
188 EXPORT_SYMBOL(atomic_add
);
189 EXPORT_SYMBOL(atomic_add_ret
);
190 EXPORT_SYMBOL(atomic_sub
);
191 EXPORT_SYMBOL(atomic_sub_ret
);
192 EXPORT_SYMBOL(atomic64_add
);
193 EXPORT_SYMBOL(atomic64_add_ret
);
194 EXPORT_SYMBOL(atomic64_sub
);
195 EXPORT_SYMBOL(atomic64_sub_ret
);
197 EXPORT_SYMBOL(_atomic_dec_and_lock
);
200 /* Atomic bit operations. */
201 EXPORT_SYMBOL(test_and_set_bit
);
202 EXPORT_SYMBOL(test_and_clear_bit
);
203 EXPORT_SYMBOL(test_and_change_bit
);
204 EXPORT_SYMBOL(set_bit
);
205 EXPORT_SYMBOL(clear_bit
);
206 EXPORT_SYMBOL(change_bit
);
209 EXPORT_SYMBOL(find_next_bit
);
210 EXPORT_SYMBOL(find_next_zero_bit
);
211 EXPORT_SYMBOL(find_next_zero_le_bit
);
213 EXPORT_SYMBOL(ivector_table
);
214 EXPORT_SYMBOL(enable_irq
);
215 EXPORT_SYMBOL(disable_irq
);
217 EXPORT_SYMBOL(__flushw_user
);
219 EXPORT_SYMBOL(tlb_type
);
220 EXPORT_SYMBOL(get_fb_unmapped_area
);
221 EXPORT_SYMBOL(flush_icache_range
);
223 EXPORT_SYMBOL(flush_dcache_page
);
224 #ifdef DCACHE_ALIASING_POSSIBLE
225 EXPORT_SYMBOL(__flush_dcache_range
);
228 EXPORT_SYMBOL(mostek_lock
);
229 EXPORT_SYMBOL(mstk48t02_regs
);
230 #ifdef CONFIG_SUN_AUXIO
231 EXPORT_SYMBOL(auxio_set_led
);
232 EXPORT_SYMBOL(auxio_set_lte
);
235 EXPORT_SYMBOL(sbus_root
);
236 EXPORT_SYMBOL(dma_chain
);
237 EXPORT_SYMBOL(sbus_set_sbus64
);
238 EXPORT_SYMBOL(sbus_alloc_consistent
);
239 EXPORT_SYMBOL(sbus_free_consistent
);
240 EXPORT_SYMBOL(sbus_map_single
);
241 EXPORT_SYMBOL(sbus_unmap_single
);
242 EXPORT_SYMBOL(sbus_map_sg
);
243 EXPORT_SYMBOL(sbus_unmap_sg
);
244 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu
);
245 EXPORT_SYMBOL(sbus_dma_sync_single_for_device
);
246 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu
);
247 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device
);
249 EXPORT_SYMBOL(outsb
);
250 EXPORT_SYMBOL(outsw
);
251 EXPORT_SYMBOL(outsl
);
256 EXPORT_SYMBOL(ebus_chain
);
257 EXPORT_SYMBOL(isa_chain
);
258 EXPORT_SYMBOL(pci_memspace_mask
);
259 EXPORT_SYMBOL(pci_alloc_consistent
);
260 EXPORT_SYMBOL(pci_free_consistent
);
261 EXPORT_SYMBOL(pci_map_single
);
262 EXPORT_SYMBOL(pci_unmap_single
);
263 EXPORT_SYMBOL(pci_map_sg
);
264 EXPORT_SYMBOL(pci_unmap_sg
);
265 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu
);
266 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu
);
267 EXPORT_SYMBOL(pci_dma_supported
);
270 /* I/O device mmaping on Sparc64. */
271 EXPORT_SYMBOL(io_remap_page_range
);
272 EXPORT_SYMBOL(io_remap_pfn_range
);
274 /* Solaris/SunOS binary compatibility */
275 EXPORT_SYMBOL(_sigpause_common
);
276 EXPORT_SYMBOL(verify_compat_iovec
);
278 EXPORT_SYMBOL(dump_thread
);
279 EXPORT_SYMBOL(dump_fpu
);
280 EXPORT_SYMBOL(pte_alloc_one_kernel
);
282 EXPORT_SYMBOL(pgt_quicklists
);
284 EXPORT_SYMBOL(put_fs_struct
);
286 /* math-emu wants this */
287 EXPORT_SYMBOL(die_if_kernel
);
289 /* Kernel thread creation. */
290 EXPORT_SYMBOL(kernel_thread
);
293 EXPORT_SYMBOL(idprom
);
294 EXPORT_SYMBOL(prom_root_node
);
295 EXPORT_SYMBOL(prom_getchild
);
296 EXPORT_SYMBOL(prom_getsibling
);
297 EXPORT_SYMBOL(prom_searchsiblings
);
298 EXPORT_SYMBOL(prom_firstprop
);
299 EXPORT_SYMBOL(prom_nextprop
);
300 EXPORT_SYMBOL(prom_getproplen
);
301 EXPORT_SYMBOL(prom_getproperty
);
302 EXPORT_SYMBOL(prom_node_has_property
);
303 EXPORT_SYMBOL(prom_setprop
);
304 EXPORT_SYMBOL(saved_command_line
);
305 EXPORT_SYMBOL(prom_getname
);
306 EXPORT_SYMBOL(prom_finddevice
);
307 EXPORT_SYMBOL(prom_feval
);
308 EXPORT_SYMBOL(prom_getbool
);
309 EXPORT_SYMBOL(prom_getstring
);
310 EXPORT_SYMBOL(prom_getint
);
311 EXPORT_SYMBOL(prom_getintdefault
);
312 EXPORT_SYMBOL(__prom_getchild
);
313 EXPORT_SYMBOL(__prom_getsibling
);
315 /* sparc library symbols */
316 EXPORT_SYMBOL(strlen
);
317 EXPORT_SYMBOL(strnlen
);
318 EXPORT_SYMBOL(__strlen_user
);
319 EXPORT_SYMBOL(__strnlen_user
);
320 EXPORT_SYMBOL(strcpy
);
321 EXPORT_SYMBOL(strncpy
);
322 EXPORT_SYMBOL(strcat
);
323 EXPORT_SYMBOL(strncat
);
324 EXPORT_SYMBOL(strcmp
);
325 EXPORT_SYMBOL(strchr
);
326 EXPORT_SYMBOL(strrchr
);
327 EXPORT_SYMBOL(strpbrk
);
328 EXPORT_SYMBOL(strstr
);
330 #ifdef CONFIG_SOLARIS_EMUL_MODULE
331 EXPORT_SYMBOL(linux_sparc_syscall
);
332 EXPORT_SYMBOL(rtrap
);
333 EXPORT_SYMBOL(show_regs
);
334 EXPORT_SYMBOL(solaris_syscall
);
335 EXPORT_SYMBOL(syscall_trace
);
336 EXPORT_SYMBOL(sunos_sys_table
);
337 EXPORT_SYMBOL(sys_call_table32
);
338 EXPORT_SYMBOL(tl0_solaris
);
339 EXPORT_SYMBOL(sys_sigsuspend
);
340 EXPORT_SYMBOL(sys_getppid
);
341 EXPORT_SYMBOL(sys_getpid
);
342 EXPORT_SYMBOL(sys_geteuid
);
343 EXPORT_SYMBOL(sys_getuid
);
344 EXPORT_SYMBOL(sys_getegid
);
345 EXPORT_SYMBOL(sys_getgid
);
346 EXPORT_SYMBOL(svr4_getcontext
);
347 EXPORT_SYMBOL(svr4_setcontext
);
348 EXPORT_SYMBOL(compat_sys_ioctl
);
349 EXPORT_SYMBOL(sparc32_open
);
350 EXPORT_SYMBOL(sys_close
);
353 /* Special internal versions of library functions. */
354 EXPORT_SYMBOL(_clear_page
);
355 EXPORT_SYMBOL(clear_user_page
);
356 EXPORT_SYMBOL(copy_user_page
);
357 EXPORT_SYMBOL(__bzero
);
358 EXPORT_SYMBOL(__memscan_zero
);
359 EXPORT_SYMBOL(__memscan_generic
);
360 EXPORT_SYMBOL(__memcmp
);
361 EXPORT_SYMBOL(__memset
);
362 EXPORT_SYMBOL(memchr
);
364 EXPORT_SYMBOL(csum_partial
);
365 EXPORT_SYMBOL(csum_partial_copy_nocheck
);
366 EXPORT_SYMBOL(__csum_partial_copy_from_user
);
367 EXPORT_SYMBOL(__csum_partial_copy_to_user
);
368 EXPORT_SYMBOL(ip_fast_csum
);
370 /* Moving data to/from/in userspace. */
371 EXPORT_SYMBOL(___copy_to_user
);
372 EXPORT_SYMBOL(___copy_from_user
);
373 EXPORT_SYMBOL(___copy_in_user
);
374 EXPORT_SYMBOL(copy_to_user_fixup
);
375 EXPORT_SYMBOL(copy_from_user_fixup
);
376 EXPORT_SYMBOL(copy_in_user_fixup
);
377 EXPORT_SYMBOL(__strncpy_from_user
);
378 EXPORT_SYMBOL(__bzero_noasi
);
380 /* Various address conversion macros use this. */
381 EXPORT_SYMBOL(phys_base
);
382 EXPORT_SYMBOL(pfn_base
);
383 EXPORT_SYMBOL(sparc64_valid_addr_bitmap
);
384 EXPORT_SYMBOL(page_to_pfn
);
385 EXPORT_SYMBOL(pfn_to_page
);
387 /* No version information on this, heavily used in inline asm,
388 * and will always be 'void __ret_efault(void)'.
390 EXPORT_SYMBOL(__ret_efault
);
392 /* No version information on these, as gcc produces such symbols. */
393 EXPORT_SYMBOL(memcmp
);
394 EXPORT_SYMBOL(memcpy
);
395 EXPORT_SYMBOL(memset
);
396 EXPORT_SYMBOL(memmove
);
397 EXPORT_SYMBOL(strncmp
);
399 /* Delay routines. */
400 EXPORT_SYMBOL(__udelay
);
401 EXPORT_SYMBOL(__ndelay
);
402 EXPORT_SYMBOL(__const_udelay
);
403 EXPORT_SYMBOL(__delay
);
406 /* RAID code needs this */
407 EXPORT_SYMBOL(VISenter
);
409 /* for input/keybdev */
410 EXPORT_SYMBOL(sun_do_break
);
411 EXPORT_SYMBOL(serial_console
);
412 EXPORT_SYMBOL(stop_a_enabled
);
414 #ifdef CONFIG_DEBUG_BUGVERBOSE
415 EXPORT_SYMBOL(do_BUG
);
419 EXPORT_SYMBOL(ns87303_lock
);
421 /* for solaris compat module */
422 EXPORT_SYMBOL_GPL(sys_call_table
);
424 EXPORT_SYMBOL(tick_ops
);
426 EXPORT_SYMBOL(xor_vis_2
);
427 EXPORT_SYMBOL(xor_vis_3
);
428 EXPORT_SYMBOL(xor_vis_4
);
429 EXPORT_SYMBOL(xor_vis_5
);
431 EXPORT_SYMBOL(prom_palette
);