1/*
2 *  linux/arch/arm26/kernel/armksyms.c
3 *
4 *  Copyright (C) 2003 Ian Molton
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/module.h>
11#include <linux/module.h>
12#include <linux/user.h>
13#include <linux/string.h>
14#include <linux/fs.h>
15#include <linux/mm.h>
16#include <linux/mman.h>
17#include <linux/delay.h>
18#include <linux/in6.h>
19#include <linux/interrupt.h>
20#include <linux/pm.h>
21#include <linux/tty.h>
22#include <linux/vt_kern.h>
23#include <linux/syscalls.h>
24
25#include <asm/byteorder.h>
26#include <asm/elf.h>
27#include <asm/io.h>
28#include <asm/irq.h>
29#include <asm/processor.h>
30#include <asm/semaphore.h>
31#include <asm/system.h>
32#include <asm/uaccess.h>
33#include <asm/checksum.h>
34#include <asm/mach-types.h>
35
36extern int dump_fpu(struct pt_regs *, struct user_fp_struct *);
37extern void inswb(unsigned int port, void *to, int len);
38extern void outswb(unsigned int port, const void *to, int len);
39
40extern void __bad_xchg(volatile void *ptr, int size);
41
42/*
43 * libgcc functions - functions that are used internally by the
44 * compiler...  (prototypes are not correct though, but that
45 * doesn't really matter since they're not versioned).
46 */
47extern void __ashldi3(void);
48extern void __ashrdi3(void);
49extern void __divsi3(void);
50extern void __lshrdi3(void);
51extern void __modsi3(void);
52extern void __muldi3(void);
53extern void __ucmpdi2(void);
54extern void __udivdi3(void);
55extern void __umoddi3(void);
56extern void __udivmoddi4(void);
57extern void __udivsi3(void);
58extern void __umodsi3(void);
59extern void abort(void);
60
61extern void ret_from_exception(void);
62extern void fpundefinstr(void);
63extern void fp_enter(void);
64
65//extern void __do_softirq(void);
66
67#define EXPORT_SYMBOL_ALIAS(sym,orig)		\
68 const char __kstrtab_##sym[]			\
69  __attribute__((section(".kstrtab"))) =	\
70    __MODULE_STRING(sym);			\
71 const struct module_symbol __ksymtab_##sym	\
72  __attribute__((section("__ksymtab"))) =	\
73    { (unsigned long)&orig, __kstrtab_##sym };
74
75/*
76 * floating point math emulator support.
77 * These symbols will never change their calling convention...
78 */
79EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);
80EXPORT_SYMBOL_ALIAS(fp_printk,printk);
81EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
82
83EXPORT_SYMBOL(fpundefinstr);
84EXPORT_SYMBOL(ret_from_exception);
85
86#ifdef CONFIG_VT
87EXPORT_SYMBOL(kd_mksound);
88#endif
89
90//EXPORT_SYMBOL(__do_softirq);
91
92	/* platform dependent support */
93EXPORT_SYMBOL(dump_thread);
94EXPORT_SYMBOL(dump_fpu);
95EXPORT_SYMBOL(udelay);
96EXPORT_SYMBOL(kernel_thread);
97EXPORT_SYMBOL(system_rev);
98EXPORT_SYMBOL(system_serial_low);
99EXPORT_SYMBOL(system_serial_high);
100#ifdef CONFIG_DEBUG_BUGVERBOSE
101EXPORT_SYMBOL(__bug);
102#endif
103EXPORT_SYMBOL(__bad_xchg);
104EXPORT_SYMBOL(__readwrite_bug);
105EXPORT_SYMBOL(enable_irq);
106EXPORT_SYMBOL(disable_irq);
107EXPORT_SYMBOL(set_irq_type);
108EXPORT_SYMBOL(pm_idle);
109EXPORT_SYMBOL(pm_power_off);
110
111	/* processor dependencies */
112EXPORT_SYMBOL(__machine_arch_type);
113
114	/* networking */
115EXPORT_SYMBOL(csum_partial_copy_nocheck);
116EXPORT_SYMBOL(__csum_ipv6_magic);
117
118	/* io */
119#ifndef __raw_readsb
120EXPORT_SYMBOL(__raw_readsb);
121#endif
122#ifndef __raw_readsw
123EXPORT_SYMBOL(__raw_readsw);
124#endif
125#ifndef __raw_readsl
126EXPORT_SYMBOL(__raw_readsl);
127#endif
128#ifndef __raw_writesb
129EXPORT_SYMBOL(__raw_writesb);
130#endif
131#ifndef __raw_writesw
132EXPORT_SYMBOL(__raw_writesw);
133#endif
134#ifndef __raw_writesl
135EXPORT_SYMBOL(__raw_writesl);
136#endif
137
138	/* string / mem functions */
139EXPORT_SYMBOL(strcpy);
140EXPORT_SYMBOL(strncpy);
141EXPORT_SYMBOL(strcat);
142EXPORT_SYMBOL(strncat);
143EXPORT_SYMBOL(strcmp);
144EXPORT_SYMBOL(strncmp);
145EXPORT_SYMBOL(strchr);
146EXPORT_SYMBOL(strlen);
147EXPORT_SYMBOL(strnlen);
148EXPORT_SYMBOL(strrchr);
149EXPORT_SYMBOL(strstr);
150EXPORT_SYMBOL(memset);
151EXPORT_SYMBOL(memcpy);
152EXPORT_SYMBOL(memmove);
153EXPORT_SYMBOL(memcmp);
154EXPORT_SYMBOL(memscan);
155EXPORT_SYMBOL(__memzero);
156
157	/* user mem (segment) */
158EXPORT_SYMBOL(uaccess_kernel);
159EXPORT_SYMBOL(uaccess_user);
160
161EXPORT_SYMBOL(__get_user_1);
162EXPORT_SYMBOL(__get_user_2);
163EXPORT_SYMBOL(__get_user_4);
164EXPORT_SYMBOL(__get_user_8);
165
166EXPORT_SYMBOL(__put_user_1);
167EXPORT_SYMBOL(__put_user_2);
168EXPORT_SYMBOL(__put_user_4);
169EXPORT_SYMBOL(__put_user_8);
170
171	/* gcc lib functions */
172EXPORT_SYMBOL(__ashldi3);
173EXPORT_SYMBOL(__ashrdi3);
174EXPORT_SYMBOL(__divsi3);
175EXPORT_SYMBOL(__lshrdi3);
176EXPORT_SYMBOL(__modsi3);
177EXPORT_SYMBOL(__muldi3);
178EXPORT_SYMBOL(__ucmpdi2);
179EXPORT_SYMBOL(__udivdi3);
180EXPORT_SYMBOL(__umoddi3);
181EXPORT_SYMBOL(__udivmoddi4);
182EXPORT_SYMBOL(__udivsi3);
183EXPORT_SYMBOL(__umodsi3);
184
185	/* bitops */
186EXPORT_SYMBOL(_set_bit_le);
187EXPORT_SYMBOL(_test_and_set_bit_le);
188EXPORT_SYMBOL(_clear_bit_le);
189EXPORT_SYMBOL(_test_and_clear_bit_le);
190EXPORT_SYMBOL(_change_bit_le);
191EXPORT_SYMBOL(_test_and_change_bit_le);
192EXPORT_SYMBOL(_find_first_zero_bit_le);
193EXPORT_SYMBOL(_find_next_zero_bit_le);
194
195	/* elf */
196EXPORT_SYMBOL(elf_platform);
197EXPORT_SYMBOL(elf_hwcap);
198
199#ifdef CONFIG_PREEMPT
200EXPORT_SYMBOL(kernel_flag);
201#endif
202