1 /*
2  * Export of symbols defined in assembler
3  */
4 
5 /* Tell string.h we don't want memcpy etc. as cpp defines */
6 #define EXPORT_SYMTAB_STROPS
7 
8 #include <linux/module.h>
9 #include <linux/string.h>
10 #include <linux/types.h>
11 
12 #include <asm/checksum.h>
13 #include <asm/uaccess.h>
14 #include <asm/ftrace.h>
15 
16 /* string functions */
17 EXPORT_SYMBOL(strlen);
18 EXPORT_SYMBOL(__strlen_user);
19 EXPORT_SYMBOL(__strnlen_user);
20 EXPORT_SYMBOL(strncmp);
21 
22 /* mem* functions */
23 extern void *__memscan_zero(void *, size_t);
24 extern void *__memscan_generic(void *, int, size_t);
25 extern void *__bzero(void *, size_t);
26 
27 EXPORT_SYMBOL(memscan);
28 EXPORT_SYMBOL(__memscan_zero);
29 EXPORT_SYMBOL(__memscan_generic);
30 EXPORT_SYMBOL(memcmp);
31 EXPORT_SYMBOL(memcpy);
32 EXPORT_SYMBOL(memset);
33 EXPORT_SYMBOL(memmove);
34 EXPORT_SYMBOL(__bzero);
35 
36 /* Moving data to/from/in userspace. */
37 EXPORT_SYMBOL(__strncpy_from_user);
38 
39 /* Networking helper routines. */
40 EXPORT_SYMBOL(csum_partial);
41 
42 #ifdef CONFIG_MCOUNT
43 EXPORT_SYMBOL(_mcount);
44 #endif
45 
46 /*
47  * sparc
48  */
49 #ifdef CONFIG_SPARC32
50 extern int __ashrdi3(int, int);
51 extern int __ashldi3(int, int);
52 extern int __lshrdi3(int, int);
53 extern int __muldi3(int, int);
54 extern int __divdi3(int, int);
55 
56 extern void (*__copy_1page)(void *, const void *);
57 extern void (*bzero_1page)(void *);
58 
59 extern int __strncmp(const char *, const char *, __kernel_size_t);
60 
61 extern void ___rw_read_enter(void);
62 extern void ___rw_read_try(void);
63 extern void ___rw_read_exit(void);
64 extern void ___rw_write_enter(void);
65 
66 /* Alias functions whose names begin with "." and export the aliases.
67  * The module references will be fixed up by module_frob_arch_sections.
68  */
69 extern int _Div(int, int);
70 extern int _Mul(int, int);
71 extern int _Rem(int, int);
72 extern unsigned _Udiv(unsigned, unsigned);
73 extern unsigned _Umul(unsigned, unsigned);
74 extern unsigned _Urem(unsigned, unsigned);
75 
76 /* Networking helper routines. */
77 EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
78 
79 /* Special internal versions of library functions. */
80 EXPORT_SYMBOL(__copy_1page);
81 EXPORT_SYMBOL(__memmove);
82 EXPORT_SYMBOL(bzero_1page);
83 
84 /* string functions */
85 EXPORT_SYMBOL(__strncmp);
86 
87 /* Moving data to/from/in userspace. */
88 EXPORT_SYMBOL(__copy_user);
89 
90 /* Used by asm/spinlock.h */
91 #ifdef CONFIG_SMP
92 EXPORT_SYMBOL(___rw_read_enter);
93 EXPORT_SYMBOL(___rw_read_try);
94 EXPORT_SYMBOL(___rw_read_exit);
95 EXPORT_SYMBOL(___rw_write_enter);
96 #endif
97 
98 EXPORT_SYMBOL(__ashrdi3);
99 EXPORT_SYMBOL(__ashldi3);
100 EXPORT_SYMBOL(__lshrdi3);
101 EXPORT_SYMBOL(__muldi3);
102 EXPORT_SYMBOL(__divdi3);
103 
104 EXPORT_SYMBOL(_Rem);
105 EXPORT_SYMBOL(_Urem);
106 EXPORT_SYMBOL(_Mul);
107 EXPORT_SYMBOL(_Umul);
108 EXPORT_SYMBOL(_Div);
109 EXPORT_SYMBOL(_Udiv);
110 #endif
111 
112 /*
113  * sparc64
114  */
115 #ifdef CONFIG_SPARC64
116 /* Networking helper routines. */
117 EXPORT_SYMBOL(csum_partial_copy_nocheck);
118 EXPORT_SYMBOL(__csum_partial_copy_from_user);
119 EXPORT_SYMBOL(__csum_partial_copy_to_user);
120 EXPORT_SYMBOL(ip_fast_csum);
121 
122 /* Moving data to/from/in userspace. */
123 EXPORT_SYMBOL(___copy_to_user);
124 EXPORT_SYMBOL(___copy_from_user);
125 EXPORT_SYMBOL(___copy_in_user);
126 EXPORT_SYMBOL(__clear_user);
127 
128 /* Atomic counter implementation. */
129 EXPORT_SYMBOL(atomic_add);
130 EXPORT_SYMBOL(atomic_add_ret);
131 EXPORT_SYMBOL(atomic_sub);
132 EXPORT_SYMBOL(atomic_sub_ret);
133 EXPORT_SYMBOL(atomic64_add);
134 EXPORT_SYMBOL(atomic64_add_ret);
135 EXPORT_SYMBOL(atomic64_sub);
136 EXPORT_SYMBOL(atomic64_sub_ret);
137 
138 /* Atomic bit operations. */
139 EXPORT_SYMBOL(test_and_set_bit);
140 EXPORT_SYMBOL(test_and_clear_bit);
141 EXPORT_SYMBOL(test_and_change_bit);
142 EXPORT_SYMBOL(set_bit);
143 EXPORT_SYMBOL(clear_bit);
144 EXPORT_SYMBOL(change_bit);
145 
146 /* Special internal versions of library functions. */
147 EXPORT_SYMBOL(_clear_page);
148 EXPORT_SYMBOL(clear_user_page);
149 EXPORT_SYMBOL(copy_user_page);
150 
151 /* RAID code needs this */
152 void VISenter(void);
153 EXPORT_SYMBOL(VISenter);
154 
155 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
156 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
157 		unsigned long *);
158 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
159 		unsigned long *, unsigned long *);
160 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
161 		unsigned long *, unsigned long *, unsigned long *);
162 EXPORT_SYMBOL(xor_vis_2);
163 EXPORT_SYMBOL(xor_vis_3);
164 EXPORT_SYMBOL(xor_vis_4);
165 EXPORT_SYMBOL(xor_vis_5);
166 
167 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
168 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
169 		unsigned long *);
170 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
171 		unsigned long *, unsigned long *);
172 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
173 		unsigned long *, unsigned long *, unsigned long *);
174 
175 EXPORT_SYMBOL(xor_niagara_2);
176 EXPORT_SYMBOL(xor_niagara_3);
177 EXPORT_SYMBOL(xor_niagara_4);
178 EXPORT_SYMBOL(xor_niagara_5);
179 #endif
180