sparc64_ksyms.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:10k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id: sparc64_ksyms.c,v 1.119 2001/11/30 01:04:10 davem Exp $
  2.  * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
  3.  *
  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)
  7.  */
  8. /* Tell string.h we don't want memcpy etc. as cpp defines */
  9. #define EXPORT_SYMTAB_STROPS
  10. #define PROMLIB_INTERNAL
  11. #include <linux/config.h>
  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/mm.h>
  21. #include <asm/oplib.h>
  22. #include <asm/delay.h>
  23. #include <asm/system.h>
  24. #include <asm/auxio.h>
  25. #include <asm/pgtable.h>
  26. #include <asm/io.h>
  27. #include <asm/irq.h>
  28. #include <asm/softirq.h>
  29. #include <asm/hardirq.h>
  30. #include <asm/idprom.h>
  31. #include <asm/svr4.h>
  32. #include <asm/elf.h>
  33. #include <asm/head.h>
  34. #include <asm/smp.h>
  35. #include <asm/mostek.h>
  36. #include <asm/ptrace.h>
  37. #include <asm/user.h>
  38. #include <asm/uaccess.h>
  39. #include <asm/checksum.h>
  40. #include <asm/fpumacro.h>
  41. #include <asm/pgalloc.h>
  42. #ifdef CONFIG_SBUS
  43. #include <asm/sbus.h>
  44. #include <asm/dma.h>
  45. #endif
  46. #ifdef CONFIG_PCI
  47. #include <asm/ebus.h>
  48. #include <asm/isa.h>
  49. #endif
  50. #include <asm/a.out.h>
  51. struct poll {
  52. int fd;
  53. short events;
  54. short revents;
  55. };
  56. extern unsigned prom_cpu_nodes[64];
  57. extern void die_if_kernel(char *str, struct pt_regs *regs);
  58. extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
  59. void _sigpause_common (unsigned int set, struct pt_regs *);
  60. extern void *__bzero(void *, size_t);
  61. extern void *__bzero_noasi(void *, size_t);
  62. extern void *__memscan_zero(void *, size_t);
  63. extern void *__memscan_generic(void *, int, size_t);
  64. extern int __memcmp(const void *, const void *, __kernel_size_t);
  65. extern int __strncmp(const char *, const char *, __kernel_size_t);
  66. extern __kernel_size_t __strlen(const char *);
  67. extern __kernel_size_t strlen(const char *);
  68. extern char saved_command_line[];
  69. extern void linux_sparc_syscall(void);
  70. extern void rtrap(void);
  71. extern void show_regs(struct pt_regs *);
  72. extern void solaris_syscall(void);
  73. extern void syscall_trace(void);
  74. extern u32 sunos_sys_table[], sys_call_table32[];
  75. extern void tl0_solaris(void);
  76. extern void sys_sigsuspend(void);
  77. extern int sys_getppid(void);
  78. extern int svr4_getcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
  79. extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
  80. extern int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
  81. extern int sys32_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
  82. extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
  83. extern long sparc32_open(const char * filename, int flags, int mode);
  84. extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));
  85. extern int unregister_ioctl32_conversion(unsigned int cmd);
  86. extern int io_remap_page_range(unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space);
  87.                 
  88. extern int __ashrdi3(int, int);
  89. extern void dump_thread(struct pt_regs *, struct user *);
  90. extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
  91. #ifdef CONFIG_SMP
  92. extern spinlock_t kernel_flag;
  93. extern int smp_num_cpus;
  94. #ifdef CONFIG_DEBUG_SPINLOCK
  95. extern void _do_spin_lock (spinlock_t *lock, char *str);
  96. extern void _do_spin_unlock (spinlock_t *lock);
  97. extern int _spin_trylock (spinlock_t *lock);
  98. extern void _do_read_lock(rwlock_t *rw, char *str);
  99. extern void _do_read_unlock(rwlock_t *rw, char *str);
  100. extern void _do_write_lock(rwlock_t *rw, char *str);
  101. extern void _do_write_unlock(rwlock_t *rw);
  102. #endif
  103. #endif
  104. extern unsigned long phys_base;
  105. /* used by various drivers */
  106. #ifdef CONFIG_SMP
  107. #ifndef CONFIG_DEBUG_SPINLOCK
  108. /* Out of line rw-locking implementation. */
  109. EXPORT_SYMBOL(__read_lock);
  110. EXPORT_SYMBOL(__read_unlock);
  111. EXPORT_SYMBOL(__write_lock);
  112. EXPORT_SYMBOL(__write_unlock);
  113. #endif
  114. /* Kernel wide locking */
  115. EXPORT_SYMBOL(kernel_flag);
  116. /* Hard IRQ locking */
  117. EXPORT_SYMBOL(global_irq_holder);
  118. #ifdef CONFIG_SMP
  119. EXPORT_SYMBOL(synchronize_irq);
  120. #endif
  121. EXPORT_SYMBOL(__global_cli);
  122. EXPORT_SYMBOL(__global_sti);
  123. EXPORT_SYMBOL(__global_save_flags);
  124. EXPORT_SYMBOL(__global_restore_flags);
  125. /* Per-CPU information table */
  126. EXPORT_SYMBOL(cpu_data);
  127. /* Misc SMP information */
  128. #ifdef CONFIG_SMP
  129. EXPORT_SYMBOL(smp_num_cpus);
  130. #endif
  131. EXPORT_SYMBOL(__cpu_number_map);
  132. EXPORT_SYMBOL(__cpu_logical_map);
  133. /* Spinlock debugging library, optional. */
  134. #ifdef CONFIG_DEBUG_SPINLOCK
  135. EXPORT_SYMBOL(_do_spin_lock);
  136. EXPORT_SYMBOL(_do_spin_unlock);
  137. EXPORT_SYMBOL(_spin_trylock);
  138. EXPORT_SYMBOL(_do_read_lock);
  139. EXPORT_SYMBOL(_do_read_unlock);
  140. EXPORT_SYMBOL(_do_write_lock);
  141. EXPORT_SYMBOL(_do_write_unlock);
  142. #endif
  143. #ifdef CONFIG_SMP
  144. EXPORT_SYMBOL(smp_call_function);
  145. #endif
  146. #endif
  147. /* semaphores */
  148. EXPORT_SYMBOL(__down);
  149. EXPORT_SYMBOL(__down_interruptible);
  150. EXPORT_SYMBOL(__up);
  151. /* Atomic counter implementation. */
  152. EXPORT_SYMBOL(__atomic_add);
  153. EXPORT_SYMBOL(__atomic_sub);
  154. #ifdef CONFIG_SMP
  155. EXPORT_SYMBOL(atomic_dec_and_lock);
  156. #endif
  157. /* Atomic bit operations. */
  158. EXPORT_SYMBOL(___test_and_set_bit);
  159. EXPORT_SYMBOL(___test_and_clear_bit);
  160. EXPORT_SYMBOL(___test_and_change_bit);
  161. EXPORT_SYMBOL(___test_and_set_le_bit);
  162. EXPORT_SYMBOL(___test_and_clear_le_bit);
  163. EXPORT_SYMBOL(ivector_table);
  164. EXPORT_SYMBOL(enable_irq);
  165. EXPORT_SYMBOL(disable_irq);
  166. EXPORT_SYMBOL(__flushw_user);
  167. EXPORT_SYMBOL(tlb_type);
  168. EXPORT_SYMBOL(get_fb_unmapped_area);
  169. EXPORT_SYMBOL(flush_icache_range);
  170. EXPORT_SYMBOL(flush_dcache_page);
  171. EXPORT_SYMBOL(mostek_lock);
  172. EXPORT_SYMBOL(mstk48t02_regs);
  173. EXPORT_SYMBOL(request_fast_irq);
  174. #if CONFIG_SUN_AUXIO
  175. EXPORT_SYMBOL(auxio_register);
  176. #endif
  177. #if CONFIG_SBUS
  178. EXPORT_SYMBOL(sbus_root);
  179. EXPORT_SYMBOL(dma_chain);
  180. EXPORT_SYMBOL(sbus_set_sbus64);
  181. EXPORT_SYMBOL(sbus_alloc_consistent);
  182. EXPORT_SYMBOL(sbus_free_consistent);
  183. EXPORT_SYMBOL(sbus_map_single);
  184. EXPORT_SYMBOL(sbus_unmap_single);
  185. EXPORT_SYMBOL(sbus_map_sg);
  186. EXPORT_SYMBOL(sbus_unmap_sg);
  187. EXPORT_SYMBOL(sbus_dma_sync_single);
  188. EXPORT_SYMBOL(sbus_dma_sync_sg);
  189. #endif
  190. #ifdef CONFIG_PCI
  191. EXPORT_SYMBOL(ebus_chain);
  192. EXPORT_SYMBOL(isa_chain);
  193. EXPORT_SYMBOL(pci_memspace_mask);
  194. EXPORT_SYMBOL(outsb);
  195. EXPORT_SYMBOL(outsw);
  196. EXPORT_SYMBOL(outsl);
  197. EXPORT_SYMBOL(insb);
  198. EXPORT_SYMBOL(insw);
  199. EXPORT_SYMBOL(insl);
  200. EXPORT_SYMBOL(pci_alloc_consistent);
  201. EXPORT_SYMBOL(pci_free_consistent);
  202. EXPORT_SYMBOL(pci_map_single);
  203. EXPORT_SYMBOL(pci_unmap_single);
  204. EXPORT_SYMBOL(pci_map_sg);
  205. EXPORT_SYMBOL(pci_unmap_sg);
  206. EXPORT_SYMBOL(pci_dma_sync_single);
  207. EXPORT_SYMBOL(pci_dma_sync_sg);
  208. EXPORT_SYMBOL(pci_dma_supported);
  209. #endif
  210. /* IOCTL32 emulation hooks. */
  211. EXPORT_SYMBOL(register_ioctl32_conversion);
  212. EXPORT_SYMBOL(unregister_ioctl32_conversion);
  213. /* I/O device mmaping on Sparc64. */
  214. EXPORT_SYMBOL(io_remap_page_range);
  215. /* Solaris/SunOS binary compatibility */
  216. EXPORT_SYMBOL(_sigpause_common);
  217. /* Should really be in linux/kernel/ksyms.c */
  218. EXPORT_SYMBOL(dump_thread);
  219. EXPORT_SYMBOL(dump_fpu);
  220. EXPORT_SYMBOL(pte_alloc_one);
  221. #ifndef CONFIG_SMP
  222. EXPORT_SYMBOL(pgt_quicklists);
  223. #endif
  224. EXPORT_SYMBOL(put_fs_struct);
  225. /* math-emu wants this */
  226. EXPORT_SYMBOL(die_if_kernel);
  227. /* Kernel thread creation. */
  228. EXPORT_SYMBOL(kernel_thread);
  229. /* prom symbols */
  230. EXPORT_SYMBOL(idprom);
  231. EXPORT_SYMBOL(prom_root_node);
  232. EXPORT_SYMBOL(prom_getchild);
  233. EXPORT_SYMBOL(prom_getsibling);
  234. EXPORT_SYMBOL(prom_searchsiblings);
  235. EXPORT_SYMBOL(prom_firstprop);
  236. EXPORT_SYMBOL(prom_nextprop);
  237. EXPORT_SYMBOL(prom_getproplen);
  238. EXPORT_SYMBOL(prom_getproperty);
  239. EXPORT_SYMBOL(prom_node_has_property);
  240. EXPORT_SYMBOL(prom_setprop);
  241. EXPORT_SYMBOL(saved_command_line);
  242. EXPORT_SYMBOL(prom_getname);
  243. EXPORT_SYMBOL(prom_finddevice);
  244. EXPORT_SYMBOL(prom_feval);
  245. EXPORT_SYMBOL(prom_getbool);
  246. EXPORT_SYMBOL(prom_getstring);
  247. EXPORT_SYMBOL(prom_getint);
  248. EXPORT_SYMBOL(prom_getintdefault);
  249. EXPORT_SYMBOL(__prom_getchild);
  250. EXPORT_SYMBOL(__prom_getsibling);
  251. /* sparc library symbols */
  252. EXPORT_SYMBOL(__strlen);
  253. EXPORT_SYMBOL(strlen);
  254. EXPORT_SYMBOL(strnlen);
  255. EXPORT_SYMBOL(__strlen_user);
  256. EXPORT_SYMBOL(__strnlen_user);
  257. EXPORT_SYMBOL(strcpy);
  258. EXPORT_SYMBOL(strncpy);
  259. EXPORT_SYMBOL(strcat);
  260. EXPORT_SYMBOL(strncat);
  261. EXPORT_SYMBOL(strcmp);
  262. EXPORT_SYMBOL(strchr);
  263. EXPORT_SYMBOL(strrchr);
  264. EXPORT_SYMBOL(strpbrk);
  265. EXPORT_SYMBOL(strtok);
  266. EXPORT_SYMBOL(strstr);
  267. #ifdef CONFIG_SOLARIS_EMUL_MODULE
  268. EXPORT_SYMBOL(linux_sparc_syscall);
  269. EXPORT_SYMBOL(rtrap);
  270. EXPORT_SYMBOL(show_regs);
  271. EXPORT_SYMBOL(solaris_syscall);
  272. EXPORT_SYMBOL(syscall_trace);
  273. EXPORT_SYMBOL(sunos_sys_table);
  274. EXPORT_SYMBOL(sys_call_table32);
  275. EXPORT_SYMBOL(tl0_solaris);
  276. EXPORT_SYMBOL(sys_sigsuspend);
  277. EXPORT_SYMBOL(sys_getppid);
  278. EXPORT_SYMBOL(svr4_getcontext);
  279. EXPORT_SYMBOL(svr4_setcontext);
  280. EXPORT_SYMBOL(prom_cpu_nodes);
  281. EXPORT_SYMBOL(sys_ioctl);
  282. EXPORT_SYMBOL(sys32_ioctl);
  283. EXPORT_SYMBOL(sparc32_open);
  284. #endif
  285. /* Special internal versions of library functions. */
  286. EXPORT_SYMBOL(__memcpy);
  287. EXPORT_SYMBOL(__memset);
  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(__strncmp);
  296. EXPORT_SYMBOL(__memmove);
  297. EXPORT_SYMBOL(csum_partial_copy_sparc64);
  298. /* Moving data to/from userspace. */
  299. EXPORT_SYMBOL(__copy_to_user);
  300. EXPORT_SYMBOL(__copy_from_user);
  301. EXPORT_SYMBOL(__strncpy_from_user);
  302. EXPORT_SYMBOL(__bzero_noasi);
  303. /* Various address conversion macros use this. */
  304. EXPORT_SYMBOL(phys_base);
  305. EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
  306. /* No version information on this, heavily used in inline asm,
  307.  * and will always be 'void __ret_efault(void)'.
  308.  */
  309. EXPORT_SYMBOL_NOVERS(__ret_efault);
  310. /* No version information on these, as gcc produces such symbols. */
  311. EXPORT_SYMBOL_NOVERS(memcmp);
  312. EXPORT_SYMBOL_NOVERS(memcpy);
  313. EXPORT_SYMBOL_NOVERS(memset);
  314. EXPORT_SYMBOL_NOVERS(memmove);
  315. void VISenter(void);
  316. /* RAID code needs this */
  317. EXPORT_SYMBOL_NOVERS(VISenter);
  318. #ifdef CONFIG_DEBUG_BUGVERBOSE
  319. EXPORT_SYMBOL(do_BUG);
  320. #endif