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.
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
8 /* Tell string.h we don't want memcpy etc. as cpp defines */
9 #define EXPORT_SYMTAB_STROPS
10 #define PROMLIB_INTERNAL
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>
23 #include <linux/syscalls.h>
25 #include <linux/pci.h>
29 #include <linux/highmem.h>
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>
39 #include <asm/idprom.h>
43 #include <asm/mostek.h>
44 #include <asm/ptrace.h>
46 #include <asm/uaccess.h>
47 #include <asm/checksum.h>
55 #include <asm/a.out.h>
56 #include <asm/io-unit.h>
59 extern spinlock_t rtc_lock;
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);
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);
85 extern void dump_thread(struct pt_regs *, struct user *);
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);
93 extern void ___rw_read_enter(void);
94 extern void ___rw_read_exit(void);
95 extern void ___rw_write_enter(void);
97 /* Alias functions whose names begin with "." and export the aliases.
98 * The module references will be fixed up by module_frob_arch_sections.
100 extern int _Div(int, int);
101 extern int _Mul(int, int);
102 extern int _Rem(int, int);
103 extern unsigned _Udiv(unsigned, unsigned);
104 extern unsigned _Umul(unsigned, unsigned);
105 extern unsigned _Urem(unsigned, unsigned);
107 /* used by various drivers */
108 EXPORT_SYMBOL(sparc_cpu_model);
109 EXPORT_SYMBOL(kernel_thread);
111 // XXX find what uses (or used) these.
112 EXPORT_SYMBOL(___rw_read_enter);
113 EXPORT_SYMBOL(___rw_read_exit);
114 EXPORT_SYMBOL(___rw_write_enter);
118 EXPORT_SYMBOL(__down);
119 EXPORT_SYMBOL(__down_trylock);
120 EXPORT_SYMBOL(__down_interruptible);
122 EXPORT_SYMBOL(sparc_valid_addr_bitmap);
123 EXPORT_SYMBOL(phys_base);
124 EXPORT_SYMBOL(pfn_base);
126 /* Atomic operations. */
127 EXPORT_SYMBOL(___atomic24_add);
128 EXPORT_SYMBOL(___atomic24_sub);
130 /* Bit operations. */
131 EXPORT_SYMBOL(___set_bit);
132 EXPORT_SYMBOL(___clear_bit);
133 EXPORT_SYMBOL(___change_bit);
135 /* Per-CPU information table */
136 EXPORT_PER_CPU_SYMBOL(__cpu_data);
139 /* IRQ implementation. */
140 EXPORT_SYMBOL(synchronize_irq);
142 /* Misc SMP information */
143 EXPORT_SYMBOL(__cpu_number_map);
144 EXPORT_SYMBOL(__cpu_logical_map);
146 /* CPU online map and active count. */
147 EXPORT_SYMBOL(cpu_online_map);
148 EXPORT_SYMBOL(phys_cpu_present_map);
151 EXPORT_SYMBOL(__udelay);
152 EXPORT_SYMBOL(__ndelay);
153 EXPORT_SYMBOL(rtc_lock);
154 EXPORT_SYMBOL(mostek_lock);
155 EXPORT_SYMBOL(mstk48t02_regs);
156 #ifdef CONFIG_SUN_AUXIO
157 EXPORT_SYMBOL(set_auxio);
158 EXPORT_SYMBOL(get_auxio);
160 EXPORT_SYMBOL(request_fast_irq);
161 EXPORT_SYMBOL(io_remap_pfn_range);
162 /* P3: iounit_xxx may be needed, sun4d users */
163 /* EXPORT_SYMBOL(iounit_map_dma_init); */
164 /* EXPORT_SYMBOL(iounit_map_dma_page); */
167 EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
169 EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
171 EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq));
172 EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq));
173 EXPORT_SYMBOL(BTFIXUP_CALL(__irq_itoa));
174 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
175 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
176 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
177 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
178 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
179 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
182 EXPORT_SYMBOL(sbus_root);
183 EXPORT_SYMBOL(dma_chain);
184 EXPORT_SYMBOL(sbus_set_sbus64);
185 EXPORT_SYMBOL(sbus_alloc_consistent);
186 EXPORT_SYMBOL(sbus_free_consistent);
187 EXPORT_SYMBOL(sbus_map_single);
188 EXPORT_SYMBOL(sbus_unmap_single);
189 EXPORT_SYMBOL(sbus_map_sg);
190 EXPORT_SYMBOL(sbus_unmap_sg);
191 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
192 EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
193 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
194 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
195 EXPORT_SYMBOL(sbus_iounmap);
196 EXPORT_SYMBOL(sbus_ioremap);
199 EXPORT_SYMBOL(ebus_chain);
201 EXPORT_SYMBOL(outsb);
203 EXPORT_SYMBOL(outsw);
205 EXPORT_SYMBOL(outsl);
206 EXPORT_SYMBOL(pci_alloc_consistent);
207 EXPORT_SYMBOL(pci_free_consistent);
208 EXPORT_SYMBOL(pci_map_single);
209 EXPORT_SYMBOL(pci_unmap_single);
210 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
211 EXPORT_SYMBOL(pci_dma_sync_single_for_device);
212 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
213 EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
214 EXPORT_SYMBOL(pci_map_sg);
215 EXPORT_SYMBOL(pci_unmap_sg);
216 EXPORT_SYMBOL(pci_map_page);
217 EXPORT_SYMBOL(pci_unmap_page);
218 /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
219 EXPORT_SYMBOL(ioremap);
220 EXPORT_SYMBOL(iounmap);
223 /* in arch/sparc/mm/highmem.c */
224 #ifdef CONFIG_HIGHMEM
225 EXPORT_SYMBOL(kmap_atomic);
226 EXPORT_SYMBOL(kunmap_atomic);
229 /* Solaris/SunOS binary compatibility */
230 EXPORT_SYMBOL(svr4_setcontext);
231 EXPORT_SYMBOL(svr4_getcontext);
232 EXPORT_SYMBOL(_sigpause_common);
234 EXPORT_SYMBOL(dump_thread);
237 EXPORT_SYMBOL(idprom);
238 EXPORT_SYMBOL(prom_root_node);
239 EXPORT_SYMBOL(prom_getchild);
240 EXPORT_SYMBOL(prom_getsibling);
241 EXPORT_SYMBOL(prom_searchsiblings);
242 EXPORT_SYMBOL(prom_firstprop);
243 EXPORT_SYMBOL(prom_nextprop);
244 EXPORT_SYMBOL(prom_getproplen);
245 EXPORT_SYMBOL(prom_getproperty);
246 EXPORT_SYMBOL(prom_node_has_property);
247 EXPORT_SYMBOL(prom_setprop);
248 EXPORT_SYMBOL(saved_command_line);
249 EXPORT_SYMBOL(prom_apply_obio_ranges);
250 EXPORT_SYMBOL(prom_getname);
251 EXPORT_SYMBOL(prom_feval);
252 EXPORT_SYMBOL(prom_getbool);
253 EXPORT_SYMBOL(prom_getstring);
254 EXPORT_SYMBOL(prom_getint);
255 EXPORT_SYMBOL(prom_getintdefault);
256 EXPORT_SYMBOL(prom_finddevice);
257 EXPORT_SYMBOL(romvec);
258 EXPORT_SYMBOL(__prom_getchild);
259 EXPORT_SYMBOL(__prom_getsibling);
261 /* sparc library symbols */
262 EXPORT_SYMBOL(memchr);
263 EXPORT_SYMBOL(memscan);
264 EXPORT_SYMBOL(strlen);
265 EXPORT_SYMBOL(strnlen);
266 EXPORT_SYMBOL(strcpy);
267 EXPORT_SYMBOL(strncpy);
268 EXPORT_SYMBOL(strcat);
269 EXPORT_SYMBOL(strncat);
270 EXPORT_SYMBOL(strcmp);
271 EXPORT_SYMBOL(strncmp);
272 EXPORT_SYMBOL(strchr);
273 EXPORT_SYMBOL(strrchr);
274 EXPORT_SYMBOL(strpbrk);
275 EXPORT_SYMBOL(strstr);
276 EXPORT_SYMBOL(page_kernel);
278 /* Special internal versions of library functions. */
279 EXPORT_SYMBOL(__copy_1page);
280 EXPORT_SYMBOL(__memcpy);
281 EXPORT_SYMBOL(__memset);
282 EXPORT_SYMBOL(bzero_1page);
283 EXPORT_SYMBOL(__bzero);
284 EXPORT_SYMBOL(__memscan_zero);
285 EXPORT_SYMBOL(__memscan_generic);
286 EXPORT_SYMBOL(__memcmp);
287 EXPORT_SYMBOL(__strncmp);
288 EXPORT_SYMBOL(__memmove);
290 /* Moving data to/from userspace. */
291 EXPORT_SYMBOL(__copy_user);
292 EXPORT_SYMBOL(__strncpy_from_user);
294 /* Networking helper routines. */
295 EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
296 EXPORT_SYMBOL(csum_partial);
298 /* Cache flushing. */
299 EXPORT_SYMBOL(sparc_flush_page_to_ram);
301 /* For when serial stuff is built as modules. */
302 EXPORT_SYMBOL(sun_do_break);
304 EXPORT_SYMBOL(__ret_efault);
306 EXPORT_SYMBOL(memcmp);
307 EXPORT_SYMBOL(memcpy);
308 EXPORT_SYMBOL(memset);
309 EXPORT_SYMBOL(memmove);
310 EXPORT_SYMBOL(__ashrdi3);
311 EXPORT_SYMBOL(__ashldi3);
312 EXPORT_SYMBOL(__lshrdi3);
313 EXPORT_SYMBOL(__muldi3);
314 EXPORT_SYMBOL(__divdi3);
317 EXPORT_SYMBOL(_Urem);
319 EXPORT_SYMBOL(_Umul);
321 EXPORT_SYMBOL(_Udiv);
323 #ifdef CONFIG_DEBUG_BUGVERBOSE
324 EXPORT_SYMBOL(do_BUG);
327 /* Sun Power Management Idle Handler */
328 EXPORT_SYMBOL(pm_idle);
330 /* Binfmt_misc needs this */
331 EXPORT_SYMBOL(sys_close);