blob: fc5ef90c4fc95863653860190f76dc92a647616a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/alpha/kernel/ksyms.c
3 *
4 * Export the alpha-specific functions that are needed for loadable
5 * modules.
6 */
7
8#include <linux/config.h>
9#include <linux/module.h>
10#include <linux/string.h>
11#include <linux/user.h>
12#include <linux/elfcore.h>
13#include <linux/socket.h>
14#include <linux/syscalls.h>
15#include <linux/in.h>
16#include <linux/in6.h>
17#include <linux/pci.h>
18#include <linux/tty.h>
19#include <linux/mm.h>
20#include <linux/delay.h>
21#include <linux/dma-mapping.h>
22
23#include <asm/io.h>
24#include <asm/console.h>
25#include <asm/hwrpb.h>
26#include <asm/uaccess.h>
27#include <asm/processor.h>
28#include <asm/checksum.h>
29#include <linux/interrupt.h>
30#include <asm/fpu.h>
31#include <asm/irq.h>
32#include <asm/machvec.h>
33#include <asm/pgalloc.h>
34#include <asm/semaphore.h>
35#include <asm/tlbflush.h>
36#include <asm/cacheflush.h>
37#include <asm/vga.h>
38
39#define __KERNEL_SYSCALLS__
40#include <asm/unistd.h>
41
42extern struct hwrpb_struct *hwrpb;
43extern void dump_thread(struct pt_regs *, struct user *);
44extern spinlock_t rtc_lock;
45
46/* these are C runtime functions with special calling conventions: */
47extern void __divl (void);
48extern void __reml (void);
49extern void __divq (void);
50extern void __remq (void);
51extern void __divlu (void);
52extern void __remlu (void);
53extern void __divqu (void);
54extern void __remqu (void);
55
56EXPORT_SYMBOL(alpha_mv);
57EXPORT_SYMBOL(enable_irq);
58EXPORT_SYMBOL(disable_irq);
59EXPORT_SYMBOL(disable_irq_nosync);
60EXPORT_SYMBOL(probe_irq_mask);
61EXPORT_SYMBOL(screen_info);
62EXPORT_SYMBOL(perf_irq);
63EXPORT_SYMBOL(callback_getenv);
64EXPORT_SYMBOL(callback_setenv);
65EXPORT_SYMBOL(callback_save_env);
66#ifdef CONFIG_ALPHA_GENERIC
67EXPORT_SYMBOL(alpha_using_srm);
68#endif /* CONFIG_ALPHA_GENERIC */
69
70/* platform dependent support */
71EXPORT_SYMBOL(strcat);
72EXPORT_SYMBOL(strcmp);
73EXPORT_SYMBOL(strcpy);
74EXPORT_SYMBOL(strlen);
75EXPORT_SYMBOL(strncmp);
76EXPORT_SYMBOL(strncpy);
77EXPORT_SYMBOL(strnlen);
78EXPORT_SYMBOL(strncat);
79EXPORT_SYMBOL(strstr);
80EXPORT_SYMBOL(strpbrk);
81EXPORT_SYMBOL(strchr);
82EXPORT_SYMBOL(strrchr);
83EXPORT_SYMBOL(memcmp);
84EXPORT_SYMBOL(memmove);
85EXPORT_SYMBOL(memscan);
86EXPORT_SYMBOL(__memcpy);
87EXPORT_SYMBOL(__memset);
88EXPORT_SYMBOL(__memsetw);
89EXPORT_SYMBOL(__constant_c_memset);
90EXPORT_SYMBOL(copy_page);
91EXPORT_SYMBOL(clear_page);
92
93EXPORT_SYMBOL(__direct_map_base);
94EXPORT_SYMBOL(__direct_map_size);
95
96#ifdef CONFIG_PCI
97EXPORT_SYMBOL(pci_alloc_consistent);
98EXPORT_SYMBOL(pci_free_consistent);
99EXPORT_SYMBOL(pci_map_single);
100EXPORT_SYMBOL(pci_map_page);
101EXPORT_SYMBOL(pci_unmap_single);
102EXPORT_SYMBOL(pci_unmap_page);
103EXPORT_SYMBOL(pci_map_sg);
104EXPORT_SYMBOL(pci_unmap_sg);
105EXPORT_SYMBOL(pci_dma_supported);
106EXPORT_SYMBOL(pci_dac_dma_supported);
107EXPORT_SYMBOL(pci_dac_page_to_dma);
108EXPORT_SYMBOL(pci_dac_dma_to_page);
109EXPORT_SYMBOL(pci_dac_dma_to_offset);
110EXPORT_SYMBOL(alpha_gendev_to_pci);
111#endif
112EXPORT_SYMBOL(dma_set_mask);
113
114EXPORT_SYMBOL(dump_thread);
115EXPORT_SYMBOL(dump_elf_thread);
116EXPORT_SYMBOL(dump_elf_task);
117EXPORT_SYMBOL(dump_elf_task_fp);
118EXPORT_SYMBOL(hwrpb);
119EXPORT_SYMBOL(start_thread);
120EXPORT_SYMBOL(alpha_read_fp_reg);
121EXPORT_SYMBOL(alpha_read_fp_reg_s);
122EXPORT_SYMBOL(alpha_write_fp_reg);
123EXPORT_SYMBOL(alpha_write_fp_reg_s);
124
125/* In-kernel system calls. */
126EXPORT_SYMBOL(kernel_thread);
127EXPORT_SYMBOL(sys_open);
128EXPORT_SYMBOL(sys_dup);
129EXPORT_SYMBOL(sys_exit);
130EXPORT_SYMBOL(sys_write);
131EXPORT_SYMBOL(sys_read);
132EXPORT_SYMBOL(sys_lseek);
133EXPORT_SYMBOL(execve);
134EXPORT_SYMBOL(sys_setsid);
135EXPORT_SYMBOL(sys_wait4);
136
137/* Networking helper routines. */
138EXPORT_SYMBOL(csum_tcpudp_magic);
139EXPORT_SYMBOL(ip_compute_csum);
140EXPORT_SYMBOL(ip_fast_csum);
141EXPORT_SYMBOL(csum_partial_copy_nocheck);
142EXPORT_SYMBOL(csum_partial_copy_from_user);
143EXPORT_SYMBOL(csum_ipv6_magic);
144
145#ifdef CONFIG_MATHEMU_MODULE
146extern long (*alpha_fp_emul_imprecise)(struct pt_regs *, unsigned long);
147extern long (*alpha_fp_emul) (unsigned long pc);
148EXPORT_SYMBOL(alpha_fp_emul_imprecise);
149EXPORT_SYMBOL(alpha_fp_emul);
150#endif
151
152#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
153EXPORT_SYMBOL(__min_ipl);
154#endif
155
156/*
157 * The following are specially called from the uaccess assembly stubs.
158 */
159EXPORT_SYMBOL(__copy_user);
160EXPORT_SYMBOL(__do_clear_user);
161EXPORT_SYMBOL(__strncpy_from_user);
162EXPORT_SYMBOL(__strnlen_user);
163
164/* Semaphore helper functions. */
165EXPORT_SYMBOL(__down_failed);
166EXPORT_SYMBOL(__down_failed_interruptible);
167EXPORT_SYMBOL(__up_wakeup);
168EXPORT_SYMBOL(down);
169EXPORT_SYMBOL(down_interruptible);
170EXPORT_SYMBOL(down_trylock);
171EXPORT_SYMBOL(up);
172
173/*
174 * SMP-specific symbols.
175 */
176
177#ifdef CONFIG_SMP
178EXPORT_SYMBOL(synchronize_irq);
179EXPORT_SYMBOL(flush_tlb_mm);
180EXPORT_SYMBOL(flush_tlb_range);
181EXPORT_SYMBOL(flush_tlb_page);
182EXPORT_SYMBOL(smp_imb);
183EXPORT_SYMBOL(cpu_data);
184EXPORT_SYMBOL(smp_num_cpus);
185EXPORT_SYMBOL(smp_call_function);
186EXPORT_SYMBOL(smp_call_function_on_cpu);
187EXPORT_SYMBOL(_atomic_dec_and_lock);
188#ifdef CONFIG_DEBUG_SPINLOCK
189EXPORT_SYMBOL(_raw_spin_unlock);
190EXPORT_SYMBOL(debug_spin_lock);
191EXPORT_SYMBOL(debug_spin_trylock);
192#endif
193#ifdef CONFIG_DEBUG_RWLOCK
194EXPORT_SYMBOL(_raw_write_lock);
195EXPORT_SYMBOL(_raw_read_lock);
196#endif
197EXPORT_SYMBOL(cpu_present_mask);
198#endif /* CONFIG_SMP */
199
200/*
201 * NUMA specific symbols
202 */
203#ifdef CONFIG_DISCONTIGMEM
204EXPORT_SYMBOL(node_data);
205#endif /* CONFIG_DISCONTIGMEM */
206
207EXPORT_SYMBOL(rtc_lock);
208
209/*
210 * The following are special because they're not called
211 * explicitly (the C compiler or assembler generates them in
212 * response to division operations). Fortunately, their
213 * interface isn't gonna change any time soon now, so it's OK
214 * to leave it out of version control.
215 */
216# undef memcpy
217# undef memset
218EXPORT_SYMBOL(__divl);
219EXPORT_SYMBOL(__divlu);
220EXPORT_SYMBOL(__divq);
221EXPORT_SYMBOL(__divqu);
222EXPORT_SYMBOL(__reml);
223EXPORT_SYMBOL(__remlu);
224EXPORT_SYMBOL(__remq);
225EXPORT_SYMBOL(__remqu);
226EXPORT_SYMBOL(memcpy);
227EXPORT_SYMBOL(memset);
228EXPORT_SYMBOL(memchr);
229
230EXPORT_SYMBOL(get_wchan);
231
232#ifdef CONFIG_ALPHA_IRONGATE
233EXPORT_SYMBOL(irongate_ioremap);
234EXPORT_SYMBOL(irongate_iounmap);
235#endif