Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6] / arch / sparc64 / kernel / sparc64_ksyms.c
1 /* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
2  *
3  * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
4  * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
5  * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
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/types.h>
14 #include <linux/string.h>
15 #include <linux/sched.h>
16 #include <linux/in6.h>
17 #include <linux/pci.h>
18 #include <linux/interrupt.h>
19 #include <linux/fs_struct.h>
20 #include <linux/fs.h>
21 #include <linux/mm.h>
22 #include <linux/socket.h>
23 #include <linux/syscalls.h>
24 #include <linux/percpu.h>
25 #include <linux/init.h>
26 #include <linux/rwsem.h>
27 #include <net/compat.h>
28
29 #include <asm/oplib.h>
30 #include <asm/system.h>
31 #include <asm/auxio.h>
32 #include <asm/pgtable.h>
33 #include <asm/io.h>
34 #include <asm/irq.h>
35 #include <asm/idprom.h>
36 #include <asm/elf.h>
37 #include <asm/head.h>
38 #include <asm/smp.h>
39 #include <asm/mostek.h>
40 #include <asm/ptrace.h>
41 #include <asm/uaccess.h>
42 #include <asm/checksum.h>
43 #include <asm/fpumacro.h>
44 #include <asm/pgalloc.h>
45 #include <asm/cacheflush.h>
46 #ifdef CONFIG_SBUS
47 #include <asm/sbus.h>
48 #include <asm/dma.h>
49 #endif
50 #ifdef CONFIG_PCI
51 #include <asm/ebus.h>
52 #include <asm/isa.h>
53 #endif
54 #include <asm/ns87303.h>
55 #include <asm/timer.h>
56 #include <asm/cpudata.h>
57
58 struct poll {
59         int fd;
60         short events;
61         short revents;
62 };
63
64 extern void die_if_kernel(char *str, struct pt_regs *regs);
65 extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
66 extern void *__bzero(void *, size_t);
67 extern void *__memscan_zero(void *, size_t);
68 extern void *__memscan_generic(void *, int, size_t);
69 extern int __memcmp(const void *, const void *, __kernel_size_t);
70 extern __kernel_size_t strlen(const char *);
71 extern void show_regs(struct pt_regs *);
72 extern void syscall_trace(struct pt_regs *, int);
73 extern void sys_sigsuspend(void);
74 extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
75 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
76 extern long sparc32_open(const char __user * filename, int flags, int mode);
77 extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
78         unsigned long pfn, unsigned long size, pgprot_t prot);
79
80 extern int __ashrdi3(int, int);
81
82 extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
83
84 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
85 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
86                       unsigned long *);
87 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
88                       unsigned long *, unsigned long *);
89 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
90                       unsigned long *, unsigned long *, unsigned long *);
91
92 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
93 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
94                           unsigned long *);
95 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
96                           unsigned long *, unsigned long *);
97 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
98                           unsigned long *, unsigned long *, unsigned long *);
99
100 /* Per-CPU information table */
101 EXPORT_PER_CPU_SYMBOL(__cpu_data);
102
103 /* used by various drivers */
104 #ifdef CONFIG_SMP
105 /* Out of line rw-locking implementation. */
106 EXPORT_SYMBOL(__read_lock);
107 EXPORT_SYMBOL(__read_unlock);
108 EXPORT_SYMBOL(__write_lock);
109 EXPORT_SYMBOL(__write_unlock);
110 EXPORT_SYMBOL(__write_trylock);
111
112 EXPORT_SYMBOL(smp_call_function);
113 #endif /* CONFIG_SMP */
114
115 #if defined(CONFIG_MCOUNT)
116 extern void _mcount(void);
117 EXPORT_SYMBOL(_mcount);
118 #endif
119
120 EXPORT_SYMBOL(sparc64_get_clock_tick);
121
122 /* RW semaphores */
123 EXPORT_SYMBOL(__down_read);
124 EXPORT_SYMBOL(__down_read_trylock);
125 EXPORT_SYMBOL(__down_write);
126 EXPORT_SYMBOL(__down_write_trylock);
127 EXPORT_SYMBOL(__up_read);
128 EXPORT_SYMBOL(__up_write);
129 EXPORT_SYMBOL(__downgrade_write);
130
131 /* Atomic counter implementation. */
132 EXPORT_SYMBOL(atomic_add);
133 EXPORT_SYMBOL(atomic_add_ret);
134 EXPORT_SYMBOL(atomic_sub);
135 EXPORT_SYMBOL(atomic_sub_ret);
136 EXPORT_SYMBOL(atomic64_add);
137 EXPORT_SYMBOL(atomic64_add_ret);
138 EXPORT_SYMBOL(atomic64_sub);
139 EXPORT_SYMBOL(atomic64_sub_ret);
140
141 /* Atomic bit operations. */
142 EXPORT_SYMBOL(test_and_set_bit);
143 EXPORT_SYMBOL(test_and_clear_bit);
144 EXPORT_SYMBOL(test_and_change_bit);
145 EXPORT_SYMBOL(set_bit);
146 EXPORT_SYMBOL(clear_bit);
147 EXPORT_SYMBOL(change_bit);
148
149 EXPORT_SYMBOL(__flushw_user);
150
151 EXPORT_SYMBOL(tlb_type);
152 EXPORT_SYMBOL(sun4v_chip_type);
153 EXPORT_SYMBOL(get_fb_unmapped_area);
154 EXPORT_SYMBOL(flush_icache_range);
155
156 EXPORT_SYMBOL(flush_dcache_page);
157 #ifdef DCACHE_ALIASING_POSSIBLE
158 EXPORT_SYMBOL(__flush_dcache_range);
159 #endif
160
161 EXPORT_SYMBOL(mostek_lock);
162 EXPORT_SYMBOL(mstk48t02_regs);
163 #ifdef CONFIG_SUN_AUXIO
164 EXPORT_SYMBOL(auxio_set_led);
165 EXPORT_SYMBOL(auxio_set_lte);
166 #endif
167 #ifdef CONFIG_SBUS
168 EXPORT_SYMBOL(sbus_root);
169 EXPORT_SYMBOL(dma_chain);
170 EXPORT_SYMBOL(sbus_set_sbus64);
171 EXPORT_SYMBOL(sbus_alloc_consistent);
172 EXPORT_SYMBOL(sbus_free_consistent);
173 EXPORT_SYMBOL(sbus_map_single);
174 EXPORT_SYMBOL(sbus_unmap_single);
175 EXPORT_SYMBOL(sbus_map_sg);
176 EXPORT_SYMBOL(sbus_unmap_sg);
177 EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
178 EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
179 EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
180 EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
181 #endif
182 EXPORT_SYMBOL(outsb);
183 EXPORT_SYMBOL(outsw);
184 EXPORT_SYMBOL(outsl);
185 EXPORT_SYMBOL(insb);
186 EXPORT_SYMBOL(insw);
187 EXPORT_SYMBOL(insl);
188 #ifdef CONFIG_PCI
189 EXPORT_SYMBOL(ebus_chain);
190 EXPORT_SYMBOL(isa_chain);
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_map_sg);
196 EXPORT_SYMBOL(pci_unmap_sg);
197 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
198 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
199 EXPORT_SYMBOL(pci_dma_supported);
200 #endif
201
202 /* I/O device mmaping on Sparc64. */
203 EXPORT_SYMBOL(io_remap_pfn_range);
204
205 EXPORT_SYMBOL(dump_fpu);
206 EXPORT_SYMBOL(put_fs_struct);
207
208 /* math-emu wants this */
209 EXPORT_SYMBOL(die_if_kernel);
210
211 /* Kernel thread creation. */
212 EXPORT_SYMBOL(kernel_thread);
213
214 /* prom symbols */
215 EXPORT_SYMBOL(idprom);
216 EXPORT_SYMBOL(prom_root_node);
217 EXPORT_SYMBOL(prom_getchild);
218 EXPORT_SYMBOL(prom_getsibling);
219 EXPORT_SYMBOL(prom_searchsiblings);
220 EXPORT_SYMBOL(prom_firstprop);
221 EXPORT_SYMBOL(prom_nextprop);
222 EXPORT_SYMBOL(prom_getproplen);
223 EXPORT_SYMBOL(prom_getproperty);
224 EXPORT_SYMBOL(prom_node_has_property);
225 EXPORT_SYMBOL(prom_setprop);
226 EXPORT_SYMBOL(saved_command_line);
227 EXPORT_SYMBOL(prom_finddevice);
228 EXPORT_SYMBOL(prom_feval);
229 EXPORT_SYMBOL(prom_getbool);
230 EXPORT_SYMBOL(prom_getstring);
231 EXPORT_SYMBOL(prom_getint);
232 EXPORT_SYMBOL(prom_getintdefault);
233 EXPORT_SYMBOL(__prom_getchild);
234 EXPORT_SYMBOL(__prom_getsibling);
235
236 /* sparc library symbols */
237 EXPORT_SYMBOL(strlen);
238 EXPORT_SYMBOL(__strlen_user);
239 EXPORT_SYMBOL(__strnlen_user);
240
241 /* Special internal versions of library functions. */
242 EXPORT_SYMBOL(_clear_page);
243 EXPORT_SYMBOL(clear_user_page);
244 EXPORT_SYMBOL(copy_user_page);
245 EXPORT_SYMBOL(__bzero);
246 EXPORT_SYMBOL(__memscan_zero);
247 EXPORT_SYMBOL(__memscan_generic);
248 EXPORT_SYMBOL(__memcmp);
249 EXPORT_SYMBOL(__memset);
250
251 EXPORT_SYMBOL(csum_partial);
252 EXPORT_SYMBOL(csum_partial_copy_nocheck);
253 EXPORT_SYMBOL(__csum_partial_copy_from_user);
254 EXPORT_SYMBOL(__csum_partial_copy_to_user);
255 EXPORT_SYMBOL(ip_fast_csum);
256
257 /* Moving data to/from/in userspace. */
258 EXPORT_SYMBOL(___copy_to_user);
259 EXPORT_SYMBOL(___copy_from_user);
260 EXPORT_SYMBOL(___copy_in_user);
261 EXPORT_SYMBOL(copy_to_user_fixup);
262 EXPORT_SYMBOL(copy_from_user_fixup);
263 EXPORT_SYMBOL(copy_in_user_fixup);
264 EXPORT_SYMBOL(__strncpy_from_user);
265 EXPORT_SYMBOL(__clear_user);
266
267 /* Various address conversion macros use this. */
268 EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
269
270 /* No version information on this, heavily used in inline asm,
271  * and will always be 'void __ret_efault(void)'.
272  */
273 EXPORT_SYMBOL(__ret_efault);
274
275 /* No version information on these, as gcc produces such symbols. */
276 EXPORT_SYMBOL(memcmp);
277 EXPORT_SYMBOL(memcpy);
278 EXPORT_SYMBOL(memset);
279 EXPORT_SYMBOL(memmove);
280 EXPORT_SYMBOL(strncmp);
281
282 void VISenter(void);
283 /* RAID code needs this */
284 EXPORT_SYMBOL(VISenter);
285
286 /* for input/keybdev */
287 EXPORT_SYMBOL(sun_do_break);
288 EXPORT_SYMBOL(stop_a_enabled);
289
290 #ifdef CONFIG_DEBUG_BUGVERBOSE
291 EXPORT_SYMBOL(do_BUG);
292 #endif
293
294 /* for ns8703 */
295 EXPORT_SYMBOL(ns87303_lock);
296
297 EXPORT_SYMBOL(tick_ops);
298
299 EXPORT_SYMBOL(xor_vis_2);
300 EXPORT_SYMBOL(xor_vis_3);
301 EXPORT_SYMBOL(xor_vis_4);
302 EXPORT_SYMBOL(xor_vis_5);
303
304 EXPORT_SYMBOL(xor_niagara_2);
305 EXPORT_SYMBOL(xor_niagara_3);
306 EXPORT_SYMBOL(xor_niagara_4);
307 EXPORT_SYMBOL(xor_niagara_5);