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>
41 #include <asm/ptrace.h>
42 #include <asm/uaccess.h>
43 #include <asm/checksum.h>
47 #include <asm/io-unit.h>
50 extern spinlock_t rtc_lock;
58 extern void (*__copy_1page)(void *, const void *);
59 extern void __memmove(void *, const void *, __kernel_size_t);
60 extern void (*bzero_1page)(void *);
61 extern void *__bzero(void *, size_t);
62 extern void *__memscan_zero(void *, size_t);
63 extern void *__memscan_generic(void *, int, size_t);
64 extern int __memcmp(const void *, const void *, __kernel_size_t);
65 extern int __strncmp(const char *, const char *, __kernel_size_t);
67 extern int __ashrdi3(int, int);
68 extern int __ashldi3(int, int);
69 extern int __lshrdi3(int, int);
70 extern int __muldi3(int, int);
71 extern int __divdi3(int, int);
73 /* Private functions with odd calling conventions. */
74 extern void ___atomic24_add(void);
75 extern void ___atomic24_sub(void);
76 extern void ___rw_read_enter(void);
77 extern void ___rw_read_try(void);
78 extern void ___rw_read_exit(void);
79 extern void ___rw_write_enter(void);
81 /* Alias functions whose names begin with "." and export the aliases.
82 * The module references will be fixed up by module_frob_arch_sections.
84 extern int _Div(int, int);
85 extern int _Mul(int, int);
86 extern int _Rem(int, int);
87 extern unsigned _Udiv(unsigned, unsigned);
88 extern unsigned _Umul(unsigned, unsigned);
89 extern unsigned _Urem(unsigned, unsigned);
91 /* used by various drivers */
92 EXPORT_SYMBOL(sparc_cpu_model);
93 EXPORT_SYMBOL(kernel_thread);
95 // XXX find what uses (or used) these. AV: see asm/spinlock.h
96 EXPORT_SYMBOL(___rw_read_enter);
97 EXPORT_SYMBOL(___rw_read_try);
98 EXPORT_SYMBOL(___rw_read_exit);
99 EXPORT_SYMBOL(___rw_write_enter);
102 EXPORT_SYMBOL(sparc_valid_addr_bitmap);
103 EXPORT_SYMBOL(phys_base);
104 EXPORT_SYMBOL(pfn_base);
106 /* Atomic operations. */
107 EXPORT_SYMBOL(___atomic24_add);
108 EXPORT_SYMBOL(___atomic24_sub);
110 /* Per-CPU information table */
111 EXPORT_PER_CPU_SYMBOL(__cpu_data);
114 /* IRQ implementation. */
115 EXPORT_SYMBOL(synchronize_irq);
117 /* CPU online map and active count. */
118 EXPORT_SYMBOL(cpu_online_map);
119 EXPORT_SYMBOL(phys_cpu_present_map);
122 EXPORT_SYMBOL(__udelay);
123 EXPORT_SYMBOL(__ndelay);
124 EXPORT_SYMBOL(rtc_lock);
125 #ifdef CONFIG_SUN_AUXIO
126 EXPORT_SYMBOL(set_auxio);
127 EXPORT_SYMBOL(get_auxio);
129 EXPORT_SYMBOL(io_remap_pfn_range);
132 EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
134 EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
136 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
137 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
138 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
139 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
140 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
141 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
143 EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached));
146 EXPORT_SYMBOL(sbus_set_sbus64);
150 EXPORT_SYMBOL(outsb);
152 EXPORT_SYMBOL(outsw);
154 EXPORT_SYMBOL(outsl);
155 EXPORT_SYMBOL(pci_alloc_consistent);
156 EXPORT_SYMBOL(pci_free_consistent);
157 EXPORT_SYMBOL(pci_map_single);
158 EXPORT_SYMBOL(pci_unmap_single);
159 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
160 EXPORT_SYMBOL(pci_dma_sync_single_for_device);
161 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
162 EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
163 EXPORT_SYMBOL(pci_map_sg);
164 EXPORT_SYMBOL(pci_unmap_sg);
165 EXPORT_SYMBOL(pci_map_page);
166 EXPORT_SYMBOL(pci_unmap_page);
167 /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
168 EXPORT_SYMBOL(ioremap);
169 EXPORT_SYMBOL(iounmap);
172 /* in arch/sparc/mm/highmem.c */
173 #ifdef CONFIG_HIGHMEM
174 EXPORT_SYMBOL(kmap_atomic);
175 EXPORT_SYMBOL(kunmap_atomic);
179 EXPORT_SYMBOL(idprom);
180 EXPORT_SYMBOL(prom_root_node);
181 EXPORT_SYMBOL(prom_getchild);
182 EXPORT_SYMBOL(prom_getsibling);
183 EXPORT_SYMBOL(prom_searchsiblings);
184 EXPORT_SYMBOL(prom_firstprop);
185 EXPORT_SYMBOL(prom_nextprop);
186 EXPORT_SYMBOL(prom_getproplen);
187 EXPORT_SYMBOL(prom_getproperty);
188 EXPORT_SYMBOL(prom_node_has_property);
189 EXPORT_SYMBOL(prom_setprop);
190 EXPORT_SYMBOL(saved_command_line);
191 EXPORT_SYMBOL(prom_apply_obio_ranges);
192 EXPORT_SYMBOL(prom_feval);
193 EXPORT_SYMBOL(prom_getbool);
194 EXPORT_SYMBOL(prom_getstring);
195 EXPORT_SYMBOL(prom_getint);
196 EXPORT_SYMBOL(prom_getintdefault);
197 EXPORT_SYMBOL(prom_finddevice);
198 EXPORT_SYMBOL(romvec);
199 EXPORT_SYMBOL(__prom_getchild);
200 EXPORT_SYMBOL(__prom_getsibling);
202 /* sparc library symbols */
203 EXPORT_SYMBOL(memscan);
204 EXPORT_SYMBOL(strlen);
205 EXPORT_SYMBOL(strncmp);
206 EXPORT_SYMBOL(page_kernel);
208 /* Special internal versions of library functions. */
209 EXPORT_SYMBOL(__copy_1page);
210 EXPORT_SYMBOL(__memcpy);
211 EXPORT_SYMBOL(__memset);
212 EXPORT_SYMBOL(bzero_1page);
213 EXPORT_SYMBOL(__bzero);
214 EXPORT_SYMBOL(__memscan_zero);
215 EXPORT_SYMBOL(__memscan_generic);
216 EXPORT_SYMBOL(__memcmp);
217 EXPORT_SYMBOL(__strncmp);
218 EXPORT_SYMBOL(__memmove);
220 /* Moving data to/from userspace. */
221 EXPORT_SYMBOL(__copy_user);
222 EXPORT_SYMBOL(__strncpy_from_user);
223 EXPORT_SYMBOL(__strnlen_user);
225 /* Networking helper routines. */
226 EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
227 EXPORT_SYMBOL(csum_partial);
229 /* Cache flushing. */
230 EXPORT_SYMBOL(sparc_flush_page_to_ram);
232 /* For when serial stuff is built as modules. */
233 EXPORT_SYMBOL(sun_do_break);
235 EXPORT_SYMBOL(__ret_efault);
237 EXPORT_SYMBOL(memcmp);
238 EXPORT_SYMBOL(memcpy);
239 EXPORT_SYMBOL(memset);
240 EXPORT_SYMBOL(memmove);
241 EXPORT_SYMBOL(__ashrdi3);
242 EXPORT_SYMBOL(__ashldi3);
243 EXPORT_SYMBOL(__lshrdi3);
244 EXPORT_SYMBOL(__muldi3);
245 EXPORT_SYMBOL(__divdi3);
248 EXPORT_SYMBOL(_Urem);
250 EXPORT_SYMBOL(_Umul);
252 EXPORT_SYMBOL(_Udiv);
254 #ifdef CONFIG_DEBUG_BUGVERBOSE
255 EXPORT_SYMBOL(do_BUG);
258 /* Sun Power Management Idle Handler */
259 EXPORT_SYMBOL(pm_idle);
261 EXPORT_SYMBOL(empty_zero_page);