Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[sfrench/cifs-2.6.git] / arch / sparc / kernel / sparc_ksyms_64.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/ptrace.h>
40 #include <asm/uaccess.h>
41 #include <asm/checksum.h>
42 #include <asm/fpumacro.h>
43 #include <asm/pgalloc.h>
44 #include <asm/cacheflush.h>
45 #ifdef CONFIG_SBUS
46 #include <asm/dma.h>
47 #endif
48 #include <asm/ns87303.h>
49 #include <asm/timer.h>
50 #include <asm/cpudata.h>
51 #include <asm/ftrace.h>
52 #include <asm/hypervisor.h>
53
54 struct poll {
55         int fd;
56         short events;
57         short revents;
58 };
59
60 extern void die_if_kernel(char *str, struct pt_regs *regs);
61 extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
62 extern void *__bzero(void *, size_t);
63 extern void *__memscan_zero(void *, size_t);
64 extern void *__memscan_generic(void *, int, size_t);
65 extern __kernel_size_t strlen(const char *);
66 extern void sys_sigsuspend(void);
67 extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
68 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
69 extern long sparc32_open(const char __user * filename, int flags, int mode);
70 extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
71         unsigned long pfn, unsigned long size, pgprot_t prot);
72
73 extern int __ashrdi3(int, int);
74
75 extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
76
77 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
78 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
79                       unsigned long *);
80 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
81                       unsigned long *, unsigned long *);
82 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
83                       unsigned long *, unsigned long *, unsigned long *);
84
85 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
86 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
87                           unsigned long *);
88 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
89                           unsigned long *, unsigned long *);
90 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
91                           unsigned long *, unsigned long *, unsigned long *);
92
93 /* Per-CPU information table */
94 EXPORT_PER_CPU_SYMBOL(__cpu_data);
95
96 /* used by various drivers */
97 #ifdef CONFIG_SMP
98 /* Out of line rw-locking implementation. */
99 EXPORT_SYMBOL(__read_lock);
100 EXPORT_SYMBOL(__read_unlock);
101 EXPORT_SYMBOL(__write_lock);
102 EXPORT_SYMBOL(__write_unlock);
103 EXPORT_SYMBOL(__write_trylock);
104 #endif /* CONFIG_SMP */
105
106 #ifdef CONFIG_MCOUNT
107 EXPORT_SYMBOL(_mcount);
108 #endif
109
110 EXPORT_SYMBOL(sparc64_get_clock_tick);
111
112 /* RW semaphores */
113 EXPORT_SYMBOL(__down_read);
114 EXPORT_SYMBOL(__down_read_trylock);
115 EXPORT_SYMBOL(__down_write);
116 EXPORT_SYMBOL(__down_write_trylock);
117 EXPORT_SYMBOL(__up_read);
118 EXPORT_SYMBOL(__up_write);
119 EXPORT_SYMBOL(__downgrade_write);
120
121 /* Atomic counter implementation. */
122 EXPORT_SYMBOL(atomic_add);
123 EXPORT_SYMBOL(atomic_add_ret);
124 EXPORT_SYMBOL(atomic_sub);
125 EXPORT_SYMBOL(atomic_sub_ret);
126 EXPORT_SYMBOL(atomic64_add);
127 EXPORT_SYMBOL(atomic64_add_ret);
128 EXPORT_SYMBOL(atomic64_sub);
129 EXPORT_SYMBOL(atomic64_sub_ret);
130
131 /* Atomic bit operations. */
132 EXPORT_SYMBOL(test_and_set_bit);
133 EXPORT_SYMBOL(test_and_clear_bit);
134 EXPORT_SYMBOL(test_and_change_bit);
135 EXPORT_SYMBOL(set_bit);
136 EXPORT_SYMBOL(clear_bit);
137 EXPORT_SYMBOL(change_bit);
138
139 EXPORT_SYMBOL(__flushw_user);
140
141 EXPORT_SYMBOL(tlb_type);
142 EXPORT_SYMBOL(sun4v_chip_type);
143 EXPORT_SYMBOL(get_fb_unmapped_area);
144 EXPORT_SYMBOL(flush_icache_range);
145
146 EXPORT_SYMBOL(flush_dcache_page);
147 #ifdef DCACHE_ALIASING_POSSIBLE
148 EXPORT_SYMBOL(__flush_dcache_range);
149 #endif
150
151 EXPORT_SYMBOL(sun4v_niagara_getperf);
152 EXPORT_SYMBOL(sun4v_niagara_setperf);
153 EXPORT_SYMBOL(sun4v_niagara2_getperf);
154 EXPORT_SYMBOL(sun4v_niagara2_setperf);
155
156 EXPORT_SYMBOL(auxio_set_led);
157 EXPORT_SYMBOL(auxio_set_lte);
158 #ifdef CONFIG_SBUS
159 EXPORT_SYMBOL(sbus_set_sbus64);
160 #endif
161 EXPORT_SYMBOL(outsb);
162 EXPORT_SYMBOL(outsw);
163 EXPORT_SYMBOL(outsl);
164 EXPORT_SYMBOL(insb);
165 EXPORT_SYMBOL(insw);
166 EXPORT_SYMBOL(insl);
167 #ifdef CONFIG_PCI
168 EXPORT_SYMBOL(pci_alloc_consistent);
169 EXPORT_SYMBOL(pci_free_consistent);
170 EXPORT_SYMBOL(pci_map_single);
171 EXPORT_SYMBOL(pci_unmap_single);
172 EXPORT_SYMBOL(pci_map_sg);
173 EXPORT_SYMBOL(pci_unmap_sg);
174 EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
175 EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
176 EXPORT_SYMBOL(pci_dma_supported);
177 #endif
178
179 /* I/O device mmaping on Sparc64. */
180 EXPORT_SYMBOL(io_remap_pfn_range);
181
182 EXPORT_SYMBOL(dump_fpu);
183
184 /* math-emu wants this */
185 EXPORT_SYMBOL(die_if_kernel);
186
187 /* Kernel thread creation. */
188 EXPORT_SYMBOL(kernel_thread);
189
190 /* prom symbols */
191 EXPORT_SYMBOL(idprom);
192 EXPORT_SYMBOL(prom_root_node);
193 EXPORT_SYMBOL(prom_getchild);
194 EXPORT_SYMBOL(prom_getsibling);
195 EXPORT_SYMBOL(prom_searchsiblings);
196 EXPORT_SYMBOL(prom_firstprop);
197 EXPORT_SYMBOL(prom_nextprop);
198 EXPORT_SYMBOL(prom_getproplen);
199 EXPORT_SYMBOL(prom_getproperty);
200 EXPORT_SYMBOL(prom_node_has_property);
201 EXPORT_SYMBOL(prom_setprop);
202 EXPORT_SYMBOL(saved_command_line);
203 EXPORT_SYMBOL(prom_finddevice);
204 EXPORT_SYMBOL(prom_feval);
205 EXPORT_SYMBOL(prom_getbool);
206 EXPORT_SYMBOL(prom_getstring);
207 EXPORT_SYMBOL(prom_getint);
208 EXPORT_SYMBOL(prom_getintdefault);
209 EXPORT_SYMBOL(__prom_getchild);
210 EXPORT_SYMBOL(__prom_getsibling);
211
212 /* sparc library symbols */
213 EXPORT_SYMBOL(strlen);
214 EXPORT_SYMBOL(__strlen_user);
215 EXPORT_SYMBOL(__strnlen_user);
216
217 /* Special internal versions of library functions. */
218 EXPORT_SYMBOL(_clear_page);
219 EXPORT_SYMBOL(clear_user_page);
220 EXPORT_SYMBOL(copy_user_page);
221 EXPORT_SYMBOL(__bzero);
222 EXPORT_SYMBOL(__memscan_zero);
223 EXPORT_SYMBOL(__memscan_generic);
224 EXPORT_SYMBOL(__memset);
225
226 EXPORT_SYMBOL(csum_partial);
227 EXPORT_SYMBOL(csum_partial_copy_nocheck);
228 EXPORT_SYMBOL(__csum_partial_copy_from_user);
229 EXPORT_SYMBOL(__csum_partial_copy_to_user);
230 EXPORT_SYMBOL(ip_fast_csum);
231
232 /* Moving data to/from/in userspace. */
233 EXPORT_SYMBOL(___copy_to_user);
234 EXPORT_SYMBOL(___copy_from_user);
235 EXPORT_SYMBOL(___copy_in_user);
236 EXPORT_SYMBOL(copy_to_user_fixup);
237 EXPORT_SYMBOL(copy_from_user_fixup);
238 EXPORT_SYMBOL(copy_in_user_fixup);
239 EXPORT_SYMBOL(__strncpy_from_user);
240 EXPORT_SYMBOL(__clear_user);
241
242 /* Various address conversion macros use this. */
243 EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
244
245 /* No version information on this, heavily used in inline asm,
246  * and will always be 'void __ret_efault(void)'.
247  */
248 EXPORT_SYMBOL(__ret_efault);
249
250 /* No version information on these, as gcc produces such symbols. */
251 EXPORT_SYMBOL(memcmp);
252 EXPORT_SYMBOL(memcpy);
253 EXPORT_SYMBOL(memset);
254 EXPORT_SYMBOL(memmove);
255 EXPORT_SYMBOL(strncmp);
256
257 void VISenter(void);
258 /* RAID code needs this */
259 EXPORT_SYMBOL(VISenter);
260
261 /* for input/keybdev */
262 EXPORT_SYMBOL(sun_do_break);
263 EXPORT_SYMBOL(stop_a_enabled);
264
265 #ifdef CONFIG_DEBUG_BUGVERBOSE
266 EXPORT_SYMBOL(do_BUG);
267 #endif
268
269 /* for ns8703 */
270 EXPORT_SYMBOL(ns87303_lock);
271
272 EXPORT_SYMBOL(tick_ops);
273
274 EXPORT_SYMBOL(xor_vis_2);
275 EXPORT_SYMBOL(xor_vis_3);
276 EXPORT_SYMBOL(xor_vis_4);
277 EXPORT_SYMBOL(xor_vis_5);
278
279 EXPORT_SYMBOL(xor_niagara_2);
280 EXPORT_SYMBOL(xor_niagara_3);
281 EXPORT_SYMBOL(xor_niagara_4);
282 EXPORT_SYMBOL(xor_niagara_5);
283
284 EXPORT_SYMBOL_GPL(real_hard_smp_processor_id);