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