Commit | Line | Data |
---|---|---|
1da177e4 LT |
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 | ||
8 | /* Tell string.h we don't want memcpy etc. as cpp defines */ | |
9 | #define EXPORT_SYMTAB_STROPS | |
10 | #define PROMLIB_INTERNAL | |
11 | ||
12 | #include <linux/config.h> | |
13 | #include <linux/module.h> | |
14 | #include <linux/init.h> | |
15 | #include <linux/smp.h> | |
16 | #include <linux/types.h> | |
17 | #include <linux/string.h> | |
18 | #include <linux/sched.h> | |
19 | #include <linux/interrupt.h> | |
20 | #include <linux/in6.h> | |
21 | #include <linux/spinlock.h> | |
22 | #include <linux/mm.h> | |
23 | #ifdef CONFIG_PCI | |
24 | #include <linux/pci.h> | |
25 | #endif | |
26 | #include <linux/pm.h> | |
27 | #ifdef CONFIG_HIGHMEM | |
28 | #include <linux/highmem.h> | |
29 | #endif | |
30 | ||
31 | #include <asm/oplib.h> | |
32 | #include <asm/delay.h> | |
33 | #include <asm/system.h> | |
34 | #include <asm/auxio.h> | |
35 | #include <asm/pgtable.h> | |
36 | #include <asm/io.h> | |
37 | #include <asm/irq.h> | |
38 | #include <asm/idprom.h> | |
39 | #include <asm/svr4.h> | |
40 | #include <asm/head.h> | |
41 | #include <asm/smp.h> | |
42 | #include <asm/mostek.h> | |
43 | #include <asm/ptrace.h> | |
44 | #include <asm/user.h> | |
45 | #include <asm/uaccess.h> | |
46 | #include <asm/checksum.h> | |
47 | #ifdef CONFIG_SBUS | |
48 | #include <asm/sbus.h> | |
49 | #include <asm/dma.h> | |
50 | #endif | |
51 | #ifdef CONFIG_PCI | |
52 | #include <asm/ebus.h> | |
53 | #endif | |
54 | #include <asm/a.out.h> | |
55 | #include <asm/io-unit.h> | |
56 | #include <asm/bug.h> | |
57 | ||
58 | extern spinlock_t rtc_lock; | |
59 | ||
60 | struct poll { | |
61 | int fd; | |
62 | short events; | |
63 | short revents; | |
64 | }; | |
65 | ||
66 | extern int svr4_getcontext (svr4_ucontext_t *, struct pt_regs *); | |
67 | extern int svr4_setcontext (svr4_ucontext_t *, struct pt_regs *); | |
68 | void _sigpause_common (unsigned int set, struct pt_regs *); | |
69 | extern void (*__copy_1page)(void *, const void *); | |
70 | extern void __memmove(void *, const void *, __kernel_size_t); | |
71 | extern void (*bzero_1page)(void *); | |
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 int __strncmp(const char *, const char *, __kernel_size_t); | |
77 | ||
78 | extern int __ashrdi3(int, int); | |
79 | extern int __ashldi3(int, int); | |
80 | extern int __lshrdi3(int, int); | |
81 | extern int __muldi3(int, int); | |
82 | extern int __divdi3(int, int); | |
83 | ||
84 | extern void dump_thread(struct pt_regs *, struct user *); | |
85 | ||
86 | /* Private functions with odd calling conventions. */ | |
87 | extern void ___atomic24_add(void); | |
88 | extern void ___atomic24_sub(void); | |
89 | extern void ___set_bit(void); | |
90 | extern void ___clear_bit(void); | |
91 | extern void ___change_bit(void); | |
92 | ||
93 | /* Alias functions whose names begin with "." and export the aliases. | |
94 | * The module references will be fixed up by module_frob_arch_sections. | |
95 | */ | |
96 | #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \ | |
97 | extern __ret __x(__arg1, __arg2) \ | |
98 | __attribute__((weak, alias("." # __x))); | |
99 | ||
100 | DOT_ALIAS2(int, div, int, int) | |
101 | DOT_ALIAS2(int, mul, int, int) | |
102 | DOT_ALIAS2(int, rem, int, int) | |
103 | DOT_ALIAS2(unsigned, udiv, unsigned, unsigned) | |
104 | DOT_ALIAS2(unsigned, umul, unsigned, unsigned) | |
105 | DOT_ALIAS2(unsigned, urem, unsigned, unsigned) | |
106 | ||
107 | #undef DOT_ALIAS2 | |
108 | ||
109 | /* used by various drivers */ | |
110 | EXPORT_SYMBOL(sparc_cpu_model); | |
111 | EXPORT_SYMBOL(kernel_thread); | |
112 | #ifdef CONFIG_DEBUG_SPINLOCK | |
113 | #ifdef CONFIG_SMP | |
114 | EXPORT_SYMBOL(_do_spin_lock); | |
115 | EXPORT_SYMBOL(_do_spin_unlock); | |
116 | EXPORT_SYMBOL(_spin_trylock); | |
117 | EXPORT_SYMBOL(_do_read_lock); | |
118 | EXPORT_SYMBOL(_do_read_unlock); | |
119 | EXPORT_SYMBOL(_do_write_lock); | |
120 | EXPORT_SYMBOL(_do_write_unlock); | |
121 | #endif | |
122 | #else | |
123 | // XXX find what uses (or used) these. | |
124 | // EXPORT_SYMBOL_PRIVATE(_rw_read_enter); | |
125 | // EXPORT_SYMBOL_PRIVATE(_rw_read_exit); | |
126 | // EXPORT_SYMBOL_PRIVATE(_rw_write_enter); | |
127 | #endif | |
128 | /* semaphores */ | |
129 | EXPORT_SYMBOL(__up); | |
130 | EXPORT_SYMBOL(__down); | |
131 | EXPORT_SYMBOL(__down_trylock); | |
132 | EXPORT_SYMBOL(__down_interruptible); | |
133 | ||
134 | EXPORT_SYMBOL(sparc_valid_addr_bitmap); | |
135 | EXPORT_SYMBOL(phys_base); | |
136 | EXPORT_SYMBOL(pfn_base); | |
137 | ||
138 | /* Atomic operations. */ | |
139 | EXPORT_SYMBOL(___atomic24_add); | |
140 | EXPORT_SYMBOL(___atomic24_sub); | |
141 | ||
142 | /* Bit operations. */ | |
143 | EXPORT_SYMBOL(___set_bit); | |
144 | EXPORT_SYMBOL(___clear_bit); | |
145 | EXPORT_SYMBOL(___change_bit); | |
146 | ||
147 | #ifdef CONFIG_SMP | |
148 | /* IRQ implementation. */ | |
149 | EXPORT_SYMBOL(synchronize_irq); | |
150 | ||
151 | /* Misc SMP information */ | |
152 | EXPORT_SYMBOL(__cpu_number_map); | |
153 | EXPORT_SYMBOL(__cpu_logical_map); | |
154 | #endif | |
155 | ||
156 | EXPORT_SYMBOL(__udelay); | |
157 | EXPORT_SYMBOL(__ndelay); | |
158 | EXPORT_SYMBOL(rtc_lock); | |
159 | EXPORT_SYMBOL(mostek_lock); | |
160 | EXPORT_SYMBOL(mstk48t02_regs); | |
161 | #ifdef CONFIG_SUN_AUXIO | |
162 | EXPORT_SYMBOL(set_auxio); | |
163 | EXPORT_SYMBOL(get_auxio); | |
164 | #endif | |
165 | EXPORT_SYMBOL(request_fast_irq); | |
166 | EXPORT_SYMBOL(io_remap_page_range); | |
167 | EXPORT_SYMBOL(io_remap_pfn_range); | |
168 | /* P3: iounit_xxx may be needed, sun4d users */ | |
169 | /* EXPORT_SYMBOL(iounit_map_dma_init); */ | |
170 | /* EXPORT_SYMBOL(iounit_map_dma_page); */ | |
171 | ||
172 | #ifndef CONFIG_SMP | |
173 | EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32)); | |
174 | #else | |
175 | EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); | |
176 | #endif | |
177 | EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq)); | |
178 | EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq)); | |
179 | EXPORT_SYMBOL(BTFIXUP_CALL(__irq_itoa)); | |
180 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); | |
181 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); | |
182 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); | |
183 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one)); | |
184 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl)); | |
185 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one)); | |
186 | ||
187 | #ifdef CONFIG_SBUS | |
188 | EXPORT_SYMBOL(sbus_root); | |
189 | EXPORT_SYMBOL(dma_chain); | |
190 | EXPORT_SYMBOL(sbus_set_sbus64); | |
191 | EXPORT_SYMBOL(sbus_alloc_consistent); | |
192 | EXPORT_SYMBOL(sbus_free_consistent); | |
193 | EXPORT_SYMBOL(sbus_map_single); | |
194 | EXPORT_SYMBOL(sbus_unmap_single); | |
195 | EXPORT_SYMBOL(sbus_map_sg); | |
196 | EXPORT_SYMBOL(sbus_unmap_sg); | |
197 | EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu); | |
198 | EXPORT_SYMBOL(sbus_dma_sync_single_for_device); | |
199 | EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu); | |
200 | EXPORT_SYMBOL(sbus_dma_sync_sg_for_device); | |
201 | EXPORT_SYMBOL(sbus_iounmap); | |
202 | EXPORT_SYMBOL(sbus_ioremap); | |
203 | #endif | |
204 | #ifdef CONFIG_PCI | |
205 | EXPORT_SYMBOL(ebus_chain); | |
206 | EXPORT_SYMBOL(insb); | |
207 | EXPORT_SYMBOL(outsb); | |
208 | EXPORT_SYMBOL(insw); | |
209 | EXPORT_SYMBOL(outsw); | |
210 | EXPORT_SYMBOL(insl); | |
211 | EXPORT_SYMBOL(outsl); | |
212 | EXPORT_SYMBOL(pci_alloc_consistent); | |
213 | EXPORT_SYMBOL(pci_free_consistent); | |
214 | EXPORT_SYMBOL(pci_map_single); | |
215 | EXPORT_SYMBOL(pci_unmap_single); | |
216 | EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); | |
217 | EXPORT_SYMBOL(pci_dma_sync_single_for_device); | |
218 | EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); | |
219 | EXPORT_SYMBOL(pci_dma_sync_sg_for_device); | |
220 | EXPORT_SYMBOL(pci_map_sg); | |
221 | EXPORT_SYMBOL(pci_unmap_sg); | |
222 | EXPORT_SYMBOL(pci_map_page); | |
223 | EXPORT_SYMBOL(pci_unmap_page); | |
224 | /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */ | |
225 | EXPORT_SYMBOL(ioremap); | |
226 | EXPORT_SYMBOL(iounmap); | |
227 | #endif | |
228 | ||
229 | /* in arch/sparc/mm/highmem.c */ | |
230 | #ifdef CONFIG_HIGHMEM | |
231 | EXPORT_SYMBOL(kmap_atomic); | |
232 | EXPORT_SYMBOL(kunmap_atomic); | |
233 | #endif | |
234 | ||
235 | /* Solaris/SunOS binary compatibility */ | |
236 | EXPORT_SYMBOL(svr4_setcontext); | |
237 | EXPORT_SYMBOL(svr4_getcontext); | |
238 | EXPORT_SYMBOL(_sigpause_common); | |
239 | ||
240 | EXPORT_SYMBOL(dump_thread); | |
241 | ||
242 | /* prom symbols */ | |
243 | EXPORT_SYMBOL(idprom); | |
244 | EXPORT_SYMBOL(prom_root_node); | |
245 | EXPORT_SYMBOL(prom_getchild); | |
246 | EXPORT_SYMBOL(prom_getsibling); | |
247 | EXPORT_SYMBOL(prom_searchsiblings); | |
248 | EXPORT_SYMBOL(prom_firstprop); | |
249 | EXPORT_SYMBOL(prom_nextprop); | |
250 | EXPORT_SYMBOL(prom_getproplen); | |
251 | EXPORT_SYMBOL(prom_getproperty); | |
252 | EXPORT_SYMBOL(prom_node_has_property); | |
253 | EXPORT_SYMBOL(prom_setprop); | |
254 | EXPORT_SYMBOL(saved_command_line); | |
255 | EXPORT_SYMBOL(prom_apply_obio_ranges); | |
256 | EXPORT_SYMBOL(prom_getname); | |
257 | EXPORT_SYMBOL(prom_feval); | |
258 | EXPORT_SYMBOL(prom_getbool); | |
259 | EXPORT_SYMBOL(prom_getstring); | |
260 | EXPORT_SYMBOL(prom_getint); | |
261 | EXPORT_SYMBOL(prom_getintdefault); | |
262 | EXPORT_SYMBOL(prom_finddevice); | |
263 | EXPORT_SYMBOL(romvec); | |
264 | EXPORT_SYMBOL(__prom_getchild); | |
265 | EXPORT_SYMBOL(__prom_getsibling); | |
266 | ||
267 | /* sparc library symbols */ | |
268 | EXPORT_SYMBOL(memchr); | |
269 | EXPORT_SYMBOL(memscan); | |
270 | EXPORT_SYMBOL(strlen); | |
271 | EXPORT_SYMBOL(strnlen); | |
272 | EXPORT_SYMBOL(strcpy); | |
273 | EXPORT_SYMBOL(strncpy); | |
274 | EXPORT_SYMBOL(strcat); | |
275 | EXPORT_SYMBOL(strncat); | |
276 | EXPORT_SYMBOL(strcmp); | |
277 | EXPORT_SYMBOL(strncmp); | |
278 | EXPORT_SYMBOL(strchr); | |
279 | EXPORT_SYMBOL(strrchr); | |
280 | EXPORT_SYMBOL(strpbrk); | |
281 | EXPORT_SYMBOL(strstr); | |
282 | EXPORT_SYMBOL(page_kernel); | |
283 | ||
284 | /* Special internal versions of library functions. */ | |
285 | EXPORT_SYMBOL(__copy_1page); | |
286 | EXPORT_SYMBOL(__memcpy); | |
287 | EXPORT_SYMBOL(__memset); | |
288 | EXPORT_SYMBOL(bzero_1page); | |
289 | EXPORT_SYMBOL(__bzero); | |
290 | EXPORT_SYMBOL(__memscan_zero); | |
291 | EXPORT_SYMBOL(__memscan_generic); | |
292 | EXPORT_SYMBOL(__memcmp); | |
293 | EXPORT_SYMBOL(__strncmp); | |
294 | EXPORT_SYMBOL(__memmove); | |
295 | ||
296 | /* Moving data to/from userspace. */ | |
297 | EXPORT_SYMBOL(__copy_user); | |
298 | EXPORT_SYMBOL(__strncpy_from_user); | |
299 | ||
300 | /* Networking helper routines. */ | |
301 | EXPORT_SYMBOL(__csum_partial_copy_sparc_generic); | |
302 | EXPORT_SYMBOL(csum_partial); | |
303 | ||
304 | /* Cache flushing. */ | |
305 | EXPORT_SYMBOL(sparc_flush_page_to_ram); | |
306 | ||
307 | /* For when serial stuff is built as modules. */ | |
308 | EXPORT_SYMBOL(sun_do_break); | |
309 | ||
310 | EXPORT_SYMBOL(__ret_efault); | |
311 | ||
312 | EXPORT_SYMBOL(memcmp); | |
313 | EXPORT_SYMBOL(memcpy); | |
314 | EXPORT_SYMBOL(memset); | |
315 | EXPORT_SYMBOL(memmove); | |
316 | EXPORT_SYMBOL(__ashrdi3); | |
317 | EXPORT_SYMBOL(__ashldi3); | |
318 | EXPORT_SYMBOL(__lshrdi3); | |
319 | EXPORT_SYMBOL(__muldi3); | |
320 | EXPORT_SYMBOL(__divdi3); | |
321 | ||
322 | EXPORT_SYMBOL(rem); | |
323 | EXPORT_SYMBOL(urem); | |
324 | EXPORT_SYMBOL(mul); | |
325 | EXPORT_SYMBOL(umul); | |
326 | EXPORT_SYMBOL(div); | |
327 | EXPORT_SYMBOL(udiv); | |
328 | ||
329 | #ifdef CONFIG_DEBUG_BUGVERBOSE | |
330 | EXPORT_SYMBOL(do_BUG); | |
331 | #endif | |
332 | ||
333 | /* Sun Power Management Idle Handler */ | |
334 | EXPORT_SYMBOL(pm_idle); |