Commit | Line | Data |
---|---|---|
88278ca2 | 1 | /* |
1da177e4 LT |
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 | ||
1da177e4 LT |
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> | |
77a6a22f | 22 | #include <linux/syscalls.h> |
1da177e4 LT |
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> | |
1da177e4 LT |
39 | #include <asm/head.h> |
40 | #include <asm/smp.h> | |
1da177e4 | 41 | #include <asm/ptrace.h> |
1da177e4 LT |
42 | #include <asm/uaccess.h> |
43 | #include <asm/checksum.h> | |
44 | #ifdef CONFIG_SBUS | |
1da177e4 LT |
45 | #include <asm/dma.h> |
46 | #endif | |
1da177e4 LT |
47 | #include <asm/io-unit.h> |
48 | #include <asm/bug.h> | |
49 | ||
50 | extern spinlock_t rtc_lock; | |
51 | ||
52 | struct poll { | |
53 | int fd; | |
54 | short events; | |
55 | short revents; | |
56 | }; | |
57 | ||
1da177e4 LT |
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); | |
1da177e4 LT |
64 | extern int __strncmp(const char *, const char *, __kernel_size_t); |
65 | ||
66 | extern int __ashrdi3(int, int); | |
67 | extern int __ashldi3(int, int); | |
68 | extern int __lshrdi3(int, int); | |
69 | extern int __muldi3(int, int); | |
70 | extern int __divdi3(int, int); | |
71 | ||
1da177e4 LT |
72 | /* Private functions with odd calling conventions. */ |
73 | extern void ___atomic24_add(void); | |
74 | extern void ___atomic24_sub(void); | |
77a6a22f | 75 | extern void ___rw_read_enter(void); |
7a39f522 | 76 | extern void ___rw_read_try(void); |
77a6a22f TC |
77 | extern void ___rw_read_exit(void); |
78 | extern void ___rw_write_enter(void); | |
1da177e4 LT |
79 | |
80 | /* Alias functions whose names begin with "." and export the aliases. | |
81 | * The module references will be fixed up by module_frob_arch_sections. | |
82 | */ | |
7caaeabb AV |
83 | extern int _Div(int, int); |
84 | extern int _Mul(int, int); | |
85 | extern int _Rem(int, int); | |
86 | extern unsigned _Udiv(unsigned, unsigned); | |
87 | extern unsigned _Umul(unsigned, unsigned); | |
88 | extern unsigned _Urem(unsigned, unsigned); | |
1da177e4 LT |
89 | |
90 | /* used by various drivers */ | |
91 | EXPORT_SYMBOL(sparc_cpu_model); | |
92 | EXPORT_SYMBOL(kernel_thread); | |
1da177e4 | 93 | #ifdef CONFIG_SMP |
7a39f522 | 94 | // XXX find what uses (or used) these. AV: see asm/spinlock.h |
77a6a22f | 95 | EXPORT_SYMBOL(___rw_read_enter); |
7a39f522 | 96 | EXPORT_SYMBOL(___rw_read_try); |
77a6a22f TC |
97 | EXPORT_SYMBOL(___rw_read_exit); |
98 | EXPORT_SYMBOL(___rw_write_enter); | |
1da177e4 | 99 | #endif |
1da177e4 LT |
100 | |
101 | EXPORT_SYMBOL(sparc_valid_addr_bitmap); | |
102 | EXPORT_SYMBOL(phys_base); | |
103 | EXPORT_SYMBOL(pfn_base); | |
104 | ||
105 | /* Atomic operations. */ | |
106 | EXPORT_SYMBOL(___atomic24_add); | |
107 | EXPORT_SYMBOL(___atomic24_sub); | |
108 | ||
962bd560 TC |
109 | /* Per-CPU information table */ |
110 | EXPORT_PER_CPU_SYMBOL(__cpu_data); | |
111 | ||
1da177e4 LT |
112 | #ifdef CONFIG_SMP |
113 | /* IRQ implementation. */ | |
114 | EXPORT_SYMBOL(synchronize_irq); | |
115 | ||
962bd560 TC |
116 | /* CPU online map and active count. */ |
117 | EXPORT_SYMBOL(cpu_online_map); | |
118 | EXPORT_SYMBOL(phys_cpu_present_map); | |
1da177e4 LT |
119 | #endif |
120 | ||
121 | EXPORT_SYMBOL(__udelay); | |
122 | EXPORT_SYMBOL(__ndelay); | |
123 | EXPORT_SYMBOL(rtc_lock); | |
1da177e4 LT |
124 | EXPORT_SYMBOL(set_auxio); |
125 | EXPORT_SYMBOL(get_auxio); | |
1da177e4 | 126 | EXPORT_SYMBOL(io_remap_pfn_range); |
1da177e4 LT |
127 | |
128 | #ifndef CONFIG_SMP | |
129 | EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32)); | |
130 | #else | |
131 | EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); | |
132 | #endif | |
1da177e4 LT |
133 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); |
134 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); | |
135 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); | |
136 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one)); | |
137 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl)); | |
138 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one)); | |
139 | ||
86ac92ee AV |
140 | EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached)); |
141 | ||
1da177e4 | 142 | #ifdef CONFIG_SBUS |
1da177e4 | 143 | EXPORT_SYMBOL(sbus_set_sbus64); |
1da177e4 LT |
144 | #endif |
145 | #ifdef CONFIG_PCI | |
1da177e4 LT |
146 | EXPORT_SYMBOL(insb); |
147 | EXPORT_SYMBOL(outsb); | |
148 | EXPORT_SYMBOL(insw); | |
149 | EXPORT_SYMBOL(outsw); | |
150 | EXPORT_SYMBOL(insl); | |
151 | EXPORT_SYMBOL(outsl); | |
152 | EXPORT_SYMBOL(pci_alloc_consistent); | |
153 | EXPORT_SYMBOL(pci_free_consistent); | |
154 | EXPORT_SYMBOL(pci_map_single); | |
155 | EXPORT_SYMBOL(pci_unmap_single); | |
156 | EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); | |
157 | EXPORT_SYMBOL(pci_dma_sync_single_for_device); | |
158 | EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); | |
159 | EXPORT_SYMBOL(pci_dma_sync_sg_for_device); | |
160 | EXPORT_SYMBOL(pci_map_sg); | |
161 | EXPORT_SYMBOL(pci_unmap_sg); | |
162 | EXPORT_SYMBOL(pci_map_page); | |
163 | EXPORT_SYMBOL(pci_unmap_page); | |
164 | /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */ | |
165 | EXPORT_SYMBOL(ioremap); | |
166 | EXPORT_SYMBOL(iounmap); | |
167 | #endif | |
168 | ||
169 | /* in arch/sparc/mm/highmem.c */ | |
170 | #ifdef CONFIG_HIGHMEM | |
171 | EXPORT_SYMBOL(kmap_atomic); | |
172 | EXPORT_SYMBOL(kunmap_atomic); | |
173 | #endif | |
174 | ||
1da177e4 LT |
175 | /* prom symbols */ |
176 | EXPORT_SYMBOL(idprom); | |
177 | EXPORT_SYMBOL(prom_root_node); | |
178 | EXPORT_SYMBOL(prom_getchild); | |
179 | EXPORT_SYMBOL(prom_getsibling); | |
180 | EXPORT_SYMBOL(prom_searchsiblings); | |
181 | EXPORT_SYMBOL(prom_firstprop); | |
182 | EXPORT_SYMBOL(prom_nextprop); | |
183 | EXPORT_SYMBOL(prom_getproplen); | |
184 | EXPORT_SYMBOL(prom_getproperty); | |
185 | EXPORT_SYMBOL(prom_node_has_property); | |
186 | EXPORT_SYMBOL(prom_setprop); | |
187 | EXPORT_SYMBOL(saved_command_line); | |
188 | EXPORT_SYMBOL(prom_apply_obio_ranges); | |
1da177e4 LT |
189 | EXPORT_SYMBOL(prom_feval); |
190 | EXPORT_SYMBOL(prom_getbool); | |
191 | EXPORT_SYMBOL(prom_getstring); | |
192 | EXPORT_SYMBOL(prom_getint); | |
193 | EXPORT_SYMBOL(prom_getintdefault); | |
194 | EXPORT_SYMBOL(prom_finddevice); | |
195 | EXPORT_SYMBOL(romvec); | |
196 | EXPORT_SYMBOL(__prom_getchild); | |
197 | EXPORT_SYMBOL(__prom_getsibling); | |
198 | ||
199 | /* sparc library symbols */ | |
1da177e4 LT |
200 | EXPORT_SYMBOL(memscan); |
201 | EXPORT_SYMBOL(strlen); | |
1da177e4 | 202 | EXPORT_SYMBOL(strncmp); |
1da177e4 LT |
203 | EXPORT_SYMBOL(page_kernel); |
204 | ||
205 | /* Special internal versions of library functions. */ | |
206 | EXPORT_SYMBOL(__copy_1page); | |
207 | EXPORT_SYMBOL(__memcpy); | |
208 | EXPORT_SYMBOL(__memset); | |
209 | EXPORT_SYMBOL(bzero_1page); | |
210 | EXPORT_SYMBOL(__bzero); | |
211 | EXPORT_SYMBOL(__memscan_zero); | |
212 | EXPORT_SYMBOL(__memscan_generic); | |
1da177e4 LT |
213 | EXPORT_SYMBOL(__strncmp); |
214 | EXPORT_SYMBOL(__memmove); | |
215 | ||
216 | /* Moving data to/from userspace. */ | |
217 | EXPORT_SYMBOL(__copy_user); | |
218 | EXPORT_SYMBOL(__strncpy_from_user); | |
86ac92ee | 219 | EXPORT_SYMBOL(__strnlen_user); |
1da177e4 LT |
220 | |
221 | /* Networking helper routines. */ | |
222 | EXPORT_SYMBOL(__csum_partial_copy_sparc_generic); | |
223 | EXPORT_SYMBOL(csum_partial); | |
224 | ||
225 | /* Cache flushing. */ | |
226 | EXPORT_SYMBOL(sparc_flush_page_to_ram); | |
227 | ||
228 | /* For when serial stuff is built as modules. */ | |
229 | EXPORT_SYMBOL(sun_do_break); | |
230 | ||
231 | EXPORT_SYMBOL(__ret_efault); | |
232 | ||
233 | EXPORT_SYMBOL(memcmp); | |
234 | EXPORT_SYMBOL(memcpy); | |
235 | EXPORT_SYMBOL(memset); | |
236 | EXPORT_SYMBOL(memmove); | |
237 | EXPORT_SYMBOL(__ashrdi3); | |
238 | EXPORT_SYMBOL(__ashldi3); | |
239 | EXPORT_SYMBOL(__lshrdi3); | |
240 | EXPORT_SYMBOL(__muldi3); | |
241 | EXPORT_SYMBOL(__divdi3); | |
242 | ||
7caaeabb AV |
243 | EXPORT_SYMBOL(_Rem); |
244 | EXPORT_SYMBOL(_Urem); | |
245 | EXPORT_SYMBOL(_Mul); | |
246 | EXPORT_SYMBOL(_Umul); | |
247 | EXPORT_SYMBOL(_Div); | |
248 | EXPORT_SYMBOL(_Udiv); | |
1da177e4 LT |
249 | |
250 | #ifdef CONFIG_DEBUG_BUGVERBOSE | |
251 | EXPORT_SYMBOL(do_BUG); | |
252 | #endif | |
253 | ||
254 | /* Sun Power Management Idle Handler */ | |
255 | EXPORT_SYMBOL(pm_idle); | |
35802c0b AK |
256 | |
257 | EXPORT_SYMBOL(empty_zero_page); |