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

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id: sparc_ksyms.c,v 1.107 2001/07/17 16:17:33 anton Exp $
  2.  * arch/sparc/kernel/ksyms.c: Sparc 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.  */
  7. /* Tell string.h we don't want memcpy etc. as cpp defines */
  8. #define EXPORT_SYMTAB_STROPS
  9. #define PROMLIB_INTERNAL
  10. #include <linux/config.h>
  11. #include <linux/module.h>
  12. #include <linux/smp.h>
  13. #include <linux/types.h>
  14. #include <linux/string.h>
  15. #include <linux/sched.h>
  16. #include <linux/interrupt.h>
  17. #include <linux/in6.h>
  18. #include <linux/spinlock.h>
  19. #include <linux/mm.h>
  20. #ifdef CONFIG_PCI
  21. #include <linux/pci.h>
  22. #endif
  23. #include <asm/oplib.h>
  24. #include <asm/delay.h>
  25. #include <asm/system.h>
  26. #include <asm/auxio.h>
  27. #include <asm/pgtable.h>
  28. #include <asm/io.h>
  29. #include <asm/irq.h>
  30. #include <asm/idprom.h>
  31. #include <asm/svr4.h>
  32. #include <asm/head.h>
  33. #include <asm/smp.h>
  34. #include <asm/mostek.h>
  35. #include <asm/ptrace.h>
  36. #include <asm/softirq.h>
  37. #include <asm/hardirq.h>
  38. #include <asm/user.h>
  39. #include <asm/uaccess.h>
  40. #include <asm/checksum.h>
  41. #ifdef CONFIG_SBUS
  42. #include <asm/sbus.h>
  43. #include <asm/dma.h>
  44. #endif
  45. #include <asm/a.out.h>
  46. #include <asm/io-unit.h>
  47. struct poll {
  48. int fd;
  49. short events;
  50. short revents;
  51. };
  52. extern int svr4_getcontext (svr4_ucontext_t *, struct pt_regs *);
  53. extern int svr4_setcontext (svr4_ucontext_t *, struct pt_regs *);
  54. void _sigpause_common (unsigned int set, struct pt_regs *);
  55. extern void (*__copy_1page)(void *, const void *);
  56. extern void __memmove(void *, const void *, __kernel_size_t);
  57. extern void (*bzero_1page)(void *);
  58. extern void *__bzero(void *, size_t);
  59. extern void *__memscan_zero(void *, size_t);
  60. extern void *__memscan_generic(void *, int, size_t);
  61. extern int __memcmp(const void *, const void *, __kernel_size_t);
  62. extern int __strncmp(const char *, const char *, __kernel_size_t);
  63. extern char saved_command_line[];
  64. extern void bcopy (const char *, char *, int);
  65. extern int __ashrdi3(int, int);
  66. extern int __ashldi3(int, int);
  67. extern int __lshrdi3(int, int);
  68. extern int __muldi3(int, int);
  69. extern int __divdi3(int, int);
  70. extern void dump_thread(struct pt_regs *, struct user *);
  71. #ifdef CONFIG_SMP
  72. extern spinlock_t kernel_flag;
  73. #endif
  74. /* One thing to note is that the way the symbols of the mul/div
  75.  * support routines are named is a mess, they all start with
  76.  * a '.' which makes it a bitch to export, here is the trick:
  77.  */
  78. #define EXPORT_SYMBOL_DOT(sym)
  79. extern int __sparc_dot_ ## sym (int) __asm__("." #sym);
  80. __EXPORT_SYMBOL(__sparc_dot_ ## sym, "." #sym)
  81. #define EXPORT_SYMBOL_PRIVATE(sym)
  82. extern int __sparc_priv_ ## sym (int) __asm__("__" #sym);
  83. const struct module_symbol __export_priv_##sym
  84. __attribute__((section("__ksymtab"))) =
  85. { (unsigned long) &__sparc_priv_ ## sym, "__" #sym }
  86. /* used by various drivers */
  87. EXPORT_SYMBOL(sparc_cpu_model);
  88. EXPORT_SYMBOL(kernel_thread);
  89. #ifdef SPIN_LOCK_DEBUG
  90. EXPORT_SYMBOL(_do_spin_lock);
  91. EXPORT_SYMBOL(_do_spin_unlock);
  92. EXPORT_SYMBOL(_spin_trylock);
  93. EXPORT_SYMBOL(_do_read_lock);
  94. EXPORT_SYMBOL(_do_read_unlock);
  95. EXPORT_SYMBOL(_do_write_lock);
  96. EXPORT_SYMBOL(_do_write_unlock);
  97. #else
  98. EXPORT_SYMBOL_PRIVATE(_rw_read_enter);
  99. EXPORT_SYMBOL_PRIVATE(_rw_read_exit);
  100. EXPORT_SYMBOL_PRIVATE(_rw_write_enter);
  101. #endif
  102. /* semaphores */
  103. EXPORT_SYMBOL(__up);
  104. EXPORT_SYMBOL(__down);
  105. EXPORT_SYMBOL(__down_trylock);
  106. EXPORT_SYMBOL(__down_interruptible);
  107. EXPORT_SYMBOL(sparc_valid_addr_bitmap);
  108. /* Atomic operations. */
  109. EXPORT_SYMBOL_PRIVATE(_atomic_add);
  110. EXPORT_SYMBOL_PRIVATE(_atomic_sub);
  111. /* Bit operations. */
  112. EXPORT_SYMBOL_PRIVATE(_set_bit);
  113. EXPORT_SYMBOL_PRIVATE(_clear_bit);
  114. EXPORT_SYMBOL_PRIVATE(_change_bit);
  115. #ifdef CONFIG_SMP
  116. /* Kernel wide locking */
  117. EXPORT_SYMBOL(kernel_flag);
  118. /* IRQ implementation. */
  119. EXPORT_SYMBOL(global_irq_holder);
  120. EXPORT_SYMBOL(synchronize_irq);
  121. EXPORT_SYMBOL(__global_cli);
  122. EXPORT_SYMBOL(__global_sti);
  123. EXPORT_SYMBOL(__global_save_flags);
  124. EXPORT_SYMBOL(__global_restore_flags);
  125. /* Misc SMP information */
  126. EXPORT_SYMBOL(smp_num_cpus);
  127. EXPORT_SYMBOL(__cpu_number_map);
  128. EXPORT_SYMBOL(__cpu_logical_map);
  129. #endif
  130. EXPORT_SYMBOL(udelay);
  131. EXPORT_SYMBOL(mostek_lock);
  132. EXPORT_SYMBOL(mstk48t02_regs);
  133. #if CONFIG_SUN_AUXIO
  134. EXPORT_SYMBOL(auxio_register);
  135. #endif
  136. EXPORT_SYMBOL(request_fast_irq);
  137. EXPORT_SYMBOL(io_remap_page_range);
  138.   /* P3: iounit_xxx may be needed, sun4d users */
  139. /* EXPORT_SYMBOL(iounit_map_dma_init); */
  140. /* EXPORT_SYMBOL(iounit_map_dma_page); */
  141. /* Btfixup stuff cannot have versions, it would be complicated too much */
  142. #ifndef CONFIG_SMP
  143. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(___xchg32));
  144. #else
  145. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__smp_processor_id));
  146. #endif
  147. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(enable_irq));
  148. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(disable_irq));
  149. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__irq_itoa));
  150. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_unlockarea));
  151. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_lockarea));
  152. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_get_scsi_sgl));
  153. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_get_scsi_one));
  154. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_release_scsi_sgl));
  155. EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(mmu_release_scsi_one));
  156. #if CONFIG_SBUS
  157. EXPORT_SYMBOL(sbus_root);
  158. EXPORT_SYMBOL(dma_chain);
  159. EXPORT_SYMBOL(sbus_set_sbus64);
  160. EXPORT_SYMBOL(sbus_alloc_consistent);
  161. EXPORT_SYMBOL(sbus_free_consistent);
  162. EXPORT_SYMBOL(sbus_map_single);
  163. EXPORT_SYMBOL(sbus_unmap_single);
  164. EXPORT_SYMBOL(sbus_map_sg);
  165. EXPORT_SYMBOL(sbus_unmap_sg);
  166. EXPORT_SYMBOL(sbus_dma_sync_single);
  167. EXPORT_SYMBOL(sbus_dma_sync_sg);
  168. EXPORT_SYMBOL(sbus_iounmap);
  169. EXPORT_SYMBOL(sbus_ioremap);
  170. #endif
  171. #if CONFIG_PCI
  172. /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
  173. EXPORT_SYMBOL(ioremap);
  174. EXPORT_SYMBOL(iounmap);
  175. EXPORT_SYMBOL(insl);
  176. EXPORT_SYMBOL(outsl);
  177. EXPORT_SYMBOL(pci_alloc_consistent);
  178. EXPORT_SYMBOL(pci_free_consistent);
  179. EXPORT_SYMBOL(pci_map_single);
  180. EXPORT_SYMBOL(pci_unmap_single);
  181. EXPORT_SYMBOL(pci_dma_sync_single);
  182. #endif
  183. /* Solaris/SunOS binary compatibility */
  184. EXPORT_SYMBOL(svr4_setcontext);
  185. EXPORT_SYMBOL(svr4_getcontext);
  186. EXPORT_SYMBOL(_sigpause_common);
  187. /* Should really be in linux/kernel/ksyms.c */
  188. EXPORT_SYMBOL(dump_thread);
  189. /* prom symbols */
  190. EXPORT_SYMBOL(idprom);
  191. EXPORT_SYMBOL(prom_root_node);
  192. EXPORT_SYMBOL(prom_getchild);
  193. EXPORT_SYMBOL(prom_getsibling);
  194. EXPORT_SYMBOL(prom_searchsiblings);
  195. EXPORT_SYMBOL(prom_firstprop);
  196. EXPORT_SYMBOL(prom_nextprop);
  197. EXPORT_SYMBOL(prom_getproplen);
  198. EXPORT_SYMBOL(prom_getproperty);
  199. EXPORT_SYMBOL(prom_node_has_property);
  200. EXPORT_SYMBOL(prom_setprop);
  201. EXPORT_SYMBOL(saved_command_line);
  202. EXPORT_SYMBOL(prom_apply_obio_ranges);
  203. EXPORT_SYMBOL(prom_getname);
  204. EXPORT_SYMBOL(prom_feval);
  205. EXPORT_SYMBOL(prom_getbool);
  206. EXPORT_SYMBOL(prom_getstring);
  207. EXPORT_SYMBOL(prom_getint);
  208. EXPORT_SYMBOL(prom_getintdefault);
  209. EXPORT_SYMBOL(prom_finddevice);
  210. EXPORT_SYMBOL(romvec);
  211. EXPORT_SYMBOL(__prom_getchild);
  212. EXPORT_SYMBOL(__prom_getsibling);
  213. /* sparc library symbols */
  214. EXPORT_SYMBOL(bcopy);
  215. EXPORT_SYMBOL_NOVERS(memscan);
  216. EXPORT_SYMBOL_NOVERS(strlen);
  217. EXPORT_SYMBOL(strnlen);
  218. EXPORT_SYMBOL(strcpy);
  219. EXPORT_SYMBOL(strncpy);
  220. EXPORT_SYMBOL(strcat);
  221. EXPORT_SYMBOL(strncat);
  222. EXPORT_SYMBOL(strcmp);
  223. EXPORT_SYMBOL_NOVERS(strncmp);
  224. EXPORT_SYMBOL(strchr);
  225. EXPORT_SYMBOL(strrchr);
  226. EXPORT_SYMBOL(strpbrk);
  227. EXPORT_SYMBOL(strtok);
  228. EXPORT_SYMBOL(strstr);
  229. EXPORT_SYMBOL(page_kernel);
  230. /* Special internal versions of library functions. */
  231. EXPORT_SYMBOL(__copy_1page);
  232. EXPORT_SYMBOL(__memcpy);
  233. EXPORT_SYMBOL(__memset);
  234. EXPORT_SYMBOL(bzero_1page);
  235. EXPORT_SYMBOL(__bzero);
  236. EXPORT_SYMBOL(__memscan_zero);
  237. EXPORT_SYMBOL(__memscan_generic);
  238. EXPORT_SYMBOL(__memcmp);
  239. EXPORT_SYMBOL(__strncmp);
  240. EXPORT_SYMBOL(__memmove);
  241. /* Moving data to/from userspace. */
  242. EXPORT_SYMBOL(__copy_user);
  243. EXPORT_SYMBOL(__strncpy_from_user);
  244. /* Networking helper routines. */
  245. /* XXX This is NOVERS because C_LABEL_STR doesn't get the version number. -DaveM */
  246. EXPORT_SYMBOL_NOVERS(__csum_partial_copy_sparc_generic);
  247. /* No version information on this, heavily used in inline asm,
  248.  * and will always be 'void __ret_efault(void)'.
  249.  */
  250. EXPORT_SYMBOL_NOVERS(__ret_efault);
  251. /* No version information on these, as gcc produces such symbols. */
  252. EXPORT_SYMBOL_NOVERS(memcmp);
  253. EXPORT_SYMBOL_NOVERS(memcpy);
  254. EXPORT_SYMBOL_NOVERS(memset);
  255. EXPORT_SYMBOL_NOVERS(memmove);
  256. EXPORT_SYMBOL_NOVERS(__ashrdi3);
  257. EXPORT_SYMBOL_NOVERS(__ashldi3);
  258. EXPORT_SYMBOL_NOVERS(__lshrdi3);
  259. EXPORT_SYMBOL_NOVERS(__muldi3);
  260. EXPORT_SYMBOL_NOVERS(__divdi3);
  261. EXPORT_SYMBOL_DOT(rem);
  262. EXPORT_SYMBOL_DOT(urem);
  263. EXPORT_SYMBOL_DOT(mul);
  264. EXPORT_SYMBOL_DOT(umul);
  265. EXPORT_SYMBOL_DOT(div);
  266. EXPORT_SYMBOL_DOT(udiv);