xref: /openbmc/linux/arch/sparc/kernel/sparc_ksyms.c (revision 08e7ca11)
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/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>
21 #include <linux/mm.h>
22 #include <linux/syscalls.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 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);
76 
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);
82 
83 /* Private functions with odd calling conventions. */
84 extern void ___atomic24_add(void);
85 extern void ___atomic24_sub(void);
86 extern void ___rw_read_enter(void);
87 extern void ___rw_read_try(void);
88 extern void ___rw_read_exit(void);
89 extern void ___rw_write_enter(void);
90 
91 /* Alias functions whose names begin with "." and export the aliases.
92  * The module references will be fixed up by module_frob_arch_sections.
93  */
94 extern int _Div(int, int);
95 extern int _Mul(int, int);
96 extern int _Rem(int, int);
97 extern unsigned _Udiv(unsigned, unsigned);
98 extern unsigned _Umul(unsigned, unsigned);
99 extern unsigned _Urem(unsigned, unsigned);
100 
101 /* used by various drivers */
102 EXPORT_SYMBOL(sparc_cpu_model);
103 EXPORT_SYMBOL(kernel_thread);
104 #ifdef CONFIG_SMP
105 // XXX find what uses (or used) these.   AV: see asm/spinlock.h
106 EXPORT_SYMBOL(___rw_read_enter);
107 EXPORT_SYMBOL(___rw_read_try);
108 EXPORT_SYMBOL(___rw_read_exit);
109 EXPORT_SYMBOL(___rw_write_enter);
110 #endif
111 /* semaphores */
112 EXPORT_SYMBOL(__up);
113 EXPORT_SYMBOL(__down);
114 EXPORT_SYMBOL(__down_trylock);
115 EXPORT_SYMBOL(__down_interruptible);
116 
117 EXPORT_SYMBOL(sparc_valid_addr_bitmap);
118 EXPORT_SYMBOL(phys_base);
119 EXPORT_SYMBOL(pfn_base);
120 
121 /* Atomic operations. */
122 EXPORT_SYMBOL(___atomic24_add);
123 EXPORT_SYMBOL(___atomic24_sub);
124 
125 /* Per-CPU information table */
126 EXPORT_PER_CPU_SYMBOL(__cpu_data);
127 
128 #ifdef CONFIG_SMP
129 /* IRQ implementation. */
130 EXPORT_SYMBOL(synchronize_irq);
131 
132 /* CPU online map and active count. */
133 EXPORT_SYMBOL(cpu_online_map);
134 EXPORT_SYMBOL(phys_cpu_present_map);
135 #endif
136 
137 EXPORT_SYMBOL(__udelay);
138 EXPORT_SYMBOL(__ndelay);
139 EXPORT_SYMBOL(rtc_lock);
140 EXPORT_SYMBOL(mostek_lock);
141 EXPORT_SYMBOL(mstk48t02_regs);
142 #ifdef CONFIG_SUN_AUXIO
143 EXPORT_SYMBOL(set_auxio);
144 EXPORT_SYMBOL(get_auxio);
145 #endif
146 EXPORT_SYMBOL(request_fast_irq);
147 EXPORT_SYMBOL(io_remap_pfn_range);
148   /* P3: iounit_xxx may be needed, sun4d users */
149 /* EXPORT_SYMBOL(iounit_map_dma_init); */
150 /* EXPORT_SYMBOL(iounit_map_dma_page); */
151 
152 #ifndef CONFIG_SMP
153 EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
154 #else
155 EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
156 #endif
157 EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq));
158 EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq));
159 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
160 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
161 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
162 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
163 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
164 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
165 
166 #ifdef CONFIG_SBUS
167 EXPORT_SYMBOL(sbus_root);
168 EXPORT_SYMBOL(dma_chain);
169 EXPORT_SYMBOL(sbus_set_sbus64);
170 EXPORT_SYMBOL(sbus_alloc_consistent);
171 EXPORT_SYMBOL(sbus_free_consistent);
172 EXPORT_SYMBOL(sbus_map_single);
173 EXPORT_SYMBOL(sbus_unmap_single);
174 EXPORT_SYMBOL(sbus_map_sg);
175 EXPORT_SYMBOL(sbus_unmap_sg);
176 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
177 EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
178 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
179 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
180 EXPORT_SYMBOL(sbus_iounmap);
181 EXPORT_SYMBOL(sbus_ioremap);
182 #endif
183 #ifdef CONFIG_PCI
184 EXPORT_SYMBOL(ebus_chain);
185 EXPORT_SYMBOL(insb);
186 EXPORT_SYMBOL(outsb);
187 EXPORT_SYMBOL(insw);
188 EXPORT_SYMBOL(outsw);
189 EXPORT_SYMBOL(insl);
190 EXPORT_SYMBOL(outsl);
191 EXPORT_SYMBOL(pci_alloc_consistent);
192 EXPORT_SYMBOL(pci_free_consistent);
193 EXPORT_SYMBOL(pci_map_single);
194 EXPORT_SYMBOL(pci_unmap_single);
195 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
196 EXPORT_SYMBOL(pci_dma_sync_single_for_device);
197 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
198 EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
199 EXPORT_SYMBOL(pci_map_sg);
200 EXPORT_SYMBOL(pci_unmap_sg);
201 EXPORT_SYMBOL(pci_map_page);
202 EXPORT_SYMBOL(pci_unmap_page);
203 /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
204 EXPORT_SYMBOL(ioremap);
205 EXPORT_SYMBOL(iounmap);
206 #endif
207 
208 /* in arch/sparc/mm/highmem.c */
209 #ifdef CONFIG_HIGHMEM
210 EXPORT_SYMBOL(kmap_atomic);
211 EXPORT_SYMBOL(kunmap_atomic);
212 #endif
213 
214 /* Solaris/SunOS binary compatibility */
215 EXPORT_SYMBOL(svr4_setcontext);
216 EXPORT_SYMBOL(svr4_getcontext);
217 
218 EXPORT_SYMBOL(dump_thread);
219 
220 /* prom symbols */
221 EXPORT_SYMBOL(idprom);
222 EXPORT_SYMBOL(prom_root_node);
223 EXPORT_SYMBOL(prom_getchild);
224 EXPORT_SYMBOL(prom_getsibling);
225 EXPORT_SYMBOL(prom_searchsiblings);
226 EXPORT_SYMBOL(prom_firstprop);
227 EXPORT_SYMBOL(prom_nextprop);
228 EXPORT_SYMBOL(prom_getproplen);
229 EXPORT_SYMBOL(prom_getproperty);
230 EXPORT_SYMBOL(prom_node_has_property);
231 EXPORT_SYMBOL(prom_setprop);
232 EXPORT_SYMBOL(boot_command_line);
233 EXPORT_SYMBOL(prom_apply_obio_ranges);
234 EXPORT_SYMBOL(prom_feval);
235 EXPORT_SYMBOL(prom_getbool);
236 EXPORT_SYMBOL(prom_getstring);
237 EXPORT_SYMBOL(prom_getint);
238 EXPORT_SYMBOL(prom_getintdefault);
239 EXPORT_SYMBOL(prom_finddevice);
240 EXPORT_SYMBOL(romvec);
241 EXPORT_SYMBOL(__prom_getchild);
242 EXPORT_SYMBOL(__prom_getsibling);
243 
244 /* sparc library symbols */
245 EXPORT_SYMBOL(memscan);
246 EXPORT_SYMBOL(strlen);
247 EXPORT_SYMBOL(strncmp);
248 EXPORT_SYMBOL(page_kernel);
249 
250 /* Special internal versions of library functions. */
251 EXPORT_SYMBOL(__copy_1page);
252 EXPORT_SYMBOL(__memcpy);
253 EXPORT_SYMBOL(__memset);
254 EXPORT_SYMBOL(bzero_1page);
255 EXPORT_SYMBOL(__bzero);
256 EXPORT_SYMBOL(__memscan_zero);
257 EXPORT_SYMBOL(__memscan_generic);
258 EXPORT_SYMBOL(__memcmp);
259 EXPORT_SYMBOL(__strncmp);
260 EXPORT_SYMBOL(__memmove);
261 
262 /* Moving data to/from userspace. */
263 EXPORT_SYMBOL(__copy_user);
264 EXPORT_SYMBOL(__strncpy_from_user);
265 
266 /* Networking helper routines. */
267 EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
268 EXPORT_SYMBOL(csum_partial);
269 
270 /* Cache flushing.  */
271 EXPORT_SYMBOL(sparc_flush_page_to_ram);
272 
273 /* For when serial stuff is built as modules. */
274 EXPORT_SYMBOL(sun_do_break);
275 
276 EXPORT_SYMBOL(__ret_efault);
277 
278 EXPORT_SYMBOL(memcmp);
279 EXPORT_SYMBOL(memcpy);
280 EXPORT_SYMBOL(memset);
281 EXPORT_SYMBOL(memmove);
282 EXPORT_SYMBOL(__ashrdi3);
283 EXPORT_SYMBOL(__ashldi3);
284 EXPORT_SYMBOL(__lshrdi3);
285 EXPORT_SYMBOL(__muldi3);
286 EXPORT_SYMBOL(__divdi3);
287 
288 EXPORT_SYMBOL(_Rem);
289 EXPORT_SYMBOL(_Urem);
290 EXPORT_SYMBOL(_Mul);
291 EXPORT_SYMBOL(_Umul);
292 EXPORT_SYMBOL(_Div);
293 EXPORT_SYMBOL(_Udiv);
294 
295 #ifdef CONFIG_DEBUG_BUGVERBOSE
296 EXPORT_SYMBOL(do_BUG);
297 #endif
298 
299 /* Sun Power Management Idle Handler */
300 EXPORT_SYMBOL(pm_idle);
301