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/module.h>
13 #include <linux/init.h>
14 #include <linux/smp.h>
15 #include <linux/types.h>
16 #include <linux/string.h>
17 #include <linux/sched.h>
18 #include <linux/interrupt.h>
19 #include <linux/in6.h>
20 #include <linux/spinlock.h>
22 #include <linux/syscalls.h>
24 #include <linux/pci.h>
28 #include <linux/highmem.h>
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>
38 #include <asm/idprom.h>
42 #include <asm/mostek.h>
43 #include <asm/ptrace.h>
45 #include <asm/uaccess.h>
46 #include <asm/checksum.h>
54 #include <asm/a.out.h>
55 #include <asm/io-unit.h>
58 extern spinlock_t rtc_lock
;
66 extern int svr4_getcontext (svr4_ucontext_t
*, struct pt_regs
*);
67 extern int svr4_setcontext (svr4_ucontext_t
*, struct pt_regs
*);
68 extern void (*__copy_1page
)(void *, const void *);
69 extern void __memmove(void *, const void *, __kernel_size_t
);
70 extern void (*bzero_1page
)(void *);
71 extern void *__bzero(void *, size_t);
72 extern void *__memscan_zero(void *, size_t);
73 extern void *__memscan_generic(void *, int, size_t);
74 extern int __memcmp(const void *, const void *, __kernel_size_t
);
75 extern int __strncmp(const char *, const char *, __kernel_size_t
);
77 extern int __ashrdi3(int, int);
78 extern int __ashldi3(int, int);
79 extern int __lshrdi3(int, int);
80 extern int __muldi3(int, int);
81 extern int __divdi3(int, int);
83 /* Private functions with odd calling conventions. */
84 extern void ___atomic24_add(void);
85 extern void ___atomic24_sub(void);
86 extern void ___set_bit(void);
87 extern void ___clear_bit(void);
88 extern void ___change_bit(void);
89 extern void ___rw_read_enter(void);
90 extern void ___rw_read_try(void);
91 extern void ___rw_read_exit(void);
92 extern void ___rw_write_enter(void);
94 /* Alias functions whose names begin with "." and export the aliases.
95 * The module references will be fixed up by module_frob_arch_sections.
97 extern int _Div(int, int);
98 extern int _Mul(int, int);
99 extern int _Rem(int, int);
100 extern unsigned _Udiv(unsigned, unsigned);
101 extern unsigned _Umul(unsigned, unsigned);
102 extern unsigned _Urem(unsigned, unsigned);
104 /* used by various drivers */
105 EXPORT_SYMBOL(sparc_cpu_model
);
106 EXPORT_SYMBOL(kernel_thread
);
108 // XXX find what uses (or used) these. AV: see asm/spinlock.h
109 EXPORT_SYMBOL(___rw_read_enter
);
110 EXPORT_SYMBOL(___rw_read_try
);
111 EXPORT_SYMBOL(___rw_read_exit
);
112 EXPORT_SYMBOL(___rw_write_enter
);
116 EXPORT_SYMBOL(__down
);
117 EXPORT_SYMBOL(__down_trylock
);
118 EXPORT_SYMBOL(__down_interruptible
);
120 EXPORT_SYMBOL(sparc_valid_addr_bitmap
);
121 EXPORT_SYMBOL(phys_base
);
122 EXPORT_SYMBOL(pfn_base
);
124 /* Atomic operations. */
125 EXPORT_SYMBOL(___atomic24_add
);
126 EXPORT_SYMBOL(___atomic24_sub
);
128 /* Bit operations. */
129 EXPORT_SYMBOL(___set_bit
);
130 EXPORT_SYMBOL(___clear_bit
);
131 EXPORT_SYMBOL(___change_bit
);
133 /* Per-CPU information table */
134 EXPORT_PER_CPU_SYMBOL(__cpu_data
);
137 /* IRQ implementation. */
138 EXPORT_SYMBOL(synchronize_irq
);
140 /* CPU online map and active count. */
141 EXPORT_SYMBOL(cpu_online_map
);
142 EXPORT_SYMBOL(phys_cpu_present_map
);
145 EXPORT_SYMBOL(__udelay
);
146 EXPORT_SYMBOL(__ndelay
);
147 EXPORT_SYMBOL(rtc_lock
);
148 EXPORT_SYMBOL(mostek_lock
);
149 EXPORT_SYMBOL(mstk48t02_regs
);
150 #ifdef CONFIG_SUN_AUXIO
151 EXPORT_SYMBOL(set_auxio
);
152 EXPORT_SYMBOL(get_auxio
);
154 EXPORT_SYMBOL(request_fast_irq
);
155 EXPORT_SYMBOL(io_remap_pfn_range
);
156 /* P3: iounit_xxx may be needed, sun4d users */
157 /* EXPORT_SYMBOL(iounit_map_dma_init); */
158 /* EXPORT_SYMBOL(iounit_map_dma_page); */
161 EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32
));
163 EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id
));
165 EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq
));
166 EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq
));
167 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea
));
168 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea
));
169 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl
));
170 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one
));
171 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl
));
172 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one
));
175 EXPORT_SYMBOL(sbus_root
);
176 EXPORT_SYMBOL(dma_chain
);
177 EXPORT_SYMBOL(sbus_set_sbus64
);
178 EXPORT_SYMBOL(sbus_alloc_consistent
);
179 EXPORT_SYMBOL(sbus_free_consistent
);
180 EXPORT_SYMBOL(sbus_map_single
);
181 EXPORT_SYMBOL(sbus_unmap_single
);
182 EXPORT_SYMBOL(sbus_map_sg
);
183 EXPORT_SYMBOL(sbus_unmap_sg
);
184 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu
);
185 EXPORT_SYMBOL(sbus_dma_sync_single_for_device
);
186 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu
);
187 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device
);
188 EXPORT_SYMBOL(sbus_iounmap
);
189 EXPORT_SYMBOL(sbus_ioremap
);
192 EXPORT_SYMBOL(ebus_chain
);
194 EXPORT_SYMBOL(outsb
);
196 EXPORT_SYMBOL(outsw
);
198 EXPORT_SYMBOL(outsl
);
199 EXPORT_SYMBOL(pci_alloc_consistent
);
200 EXPORT_SYMBOL(pci_free_consistent
);
201 EXPORT_SYMBOL(pci_map_single
);
202 EXPORT_SYMBOL(pci_unmap_single
);
203 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu
);
204 EXPORT_SYMBOL(pci_dma_sync_single_for_device
);
205 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu
);
206 EXPORT_SYMBOL(pci_dma_sync_sg_for_device
);
207 EXPORT_SYMBOL(pci_map_sg
);
208 EXPORT_SYMBOL(pci_unmap_sg
);
209 EXPORT_SYMBOL(pci_map_page
);
210 EXPORT_SYMBOL(pci_unmap_page
);
211 /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
212 EXPORT_SYMBOL(ioremap
);
213 EXPORT_SYMBOL(iounmap
);
216 /* in arch/sparc/mm/highmem.c */
217 #ifdef CONFIG_HIGHMEM
218 EXPORT_SYMBOL(kmap_atomic
);
219 EXPORT_SYMBOL(kunmap_atomic
);
222 /* Solaris/SunOS binary compatibility */
223 EXPORT_SYMBOL(svr4_setcontext
);
224 EXPORT_SYMBOL(svr4_getcontext
);
226 EXPORT_SYMBOL(dump_thread
);
229 EXPORT_SYMBOL(idprom
);
230 EXPORT_SYMBOL(prom_root_node
);
231 EXPORT_SYMBOL(prom_getchild
);
232 EXPORT_SYMBOL(prom_getsibling
);
233 EXPORT_SYMBOL(prom_searchsiblings
);
234 EXPORT_SYMBOL(prom_firstprop
);
235 EXPORT_SYMBOL(prom_nextprop
);
236 EXPORT_SYMBOL(prom_getproplen
);
237 EXPORT_SYMBOL(prom_getproperty
);
238 EXPORT_SYMBOL(prom_node_has_property
);
239 EXPORT_SYMBOL(prom_setprop
);
240 EXPORT_SYMBOL(saved_command_line
);
241 EXPORT_SYMBOL(prom_apply_obio_ranges
);
242 EXPORT_SYMBOL(prom_feval
);
243 EXPORT_SYMBOL(prom_getbool
);
244 EXPORT_SYMBOL(prom_getstring
);
245 EXPORT_SYMBOL(prom_getint
);
246 EXPORT_SYMBOL(prom_getintdefault
);
247 EXPORT_SYMBOL(prom_finddevice
);
248 EXPORT_SYMBOL(romvec
);
249 EXPORT_SYMBOL(__prom_getchild
);
250 EXPORT_SYMBOL(__prom_getsibling
);
252 /* sparc library symbols */
253 EXPORT_SYMBOL(memscan
);
254 EXPORT_SYMBOL(strlen
);
255 EXPORT_SYMBOL(strncmp
);
256 EXPORT_SYMBOL(page_kernel
);
258 /* Special internal versions of library functions. */
259 EXPORT_SYMBOL(__copy_1page
);
260 EXPORT_SYMBOL(__memcpy
);
261 EXPORT_SYMBOL(__memset
);
262 EXPORT_SYMBOL(bzero_1page
);
263 EXPORT_SYMBOL(__bzero
);
264 EXPORT_SYMBOL(__memscan_zero
);
265 EXPORT_SYMBOL(__memscan_generic
);
266 EXPORT_SYMBOL(__memcmp
);
267 EXPORT_SYMBOL(__strncmp
);
268 EXPORT_SYMBOL(__memmove
);
270 /* Moving data to/from userspace. */
271 EXPORT_SYMBOL(__copy_user
);
272 EXPORT_SYMBOL(__strncpy_from_user
);
274 /* Networking helper routines. */
275 EXPORT_SYMBOL(__csum_partial_copy_sparc_generic
);
276 EXPORT_SYMBOL(csum_partial
);
278 /* Cache flushing. */
279 EXPORT_SYMBOL(sparc_flush_page_to_ram
);
281 /* For when serial stuff is built as modules. */
282 EXPORT_SYMBOL(sun_do_break
);
284 EXPORT_SYMBOL(__ret_efault
);
286 EXPORT_SYMBOL(memcmp
);
287 EXPORT_SYMBOL(memcpy
);
288 EXPORT_SYMBOL(memset
);
289 EXPORT_SYMBOL(memmove
);
290 EXPORT_SYMBOL(__ashrdi3
);
291 EXPORT_SYMBOL(__ashldi3
);
292 EXPORT_SYMBOL(__lshrdi3
);
293 EXPORT_SYMBOL(__muldi3
);
294 EXPORT_SYMBOL(__divdi3
);
297 EXPORT_SYMBOL(_Urem
);
299 EXPORT_SYMBOL(_Umul
);
301 EXPORT_SYMBOL(_Udiv
);
303 #ifdef CONFIG_DEBUG_BUGVERBOSE
304 EXPORT_SYMBOL(do_BUG
);
307 /* Sun Power Management Idle Handler */
308 EXPORT_SYMBOL(pm_idle
);