6b278abdb63decf5c231098e217bbf4a1c97aa6b
[~shefty/rdma-dev.git] / arch / sparc / lib / ksyms.c
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 /* Networking helper routines. */
37 EXPORT_SYMBOL(csum_partial);
38
39 #ifdef CONFIG_MCOUNT
40 EXPORT_SYMBOL(_mcount);
41 #endif
42
43 /*
44  * sparc
45  */
46 #ifdef CONFIG_SPARC32
47 extern int __ashrdi3(int, int);
48 extern int __ashldi3(int, int);
49 extern int __lshrdi3(int, int);
50 extern int __muldi3(int, int);
51 extern int __divdi3(int, int);
52
53 extern void (*__copy_1page)(void *, const void *);
54 extern void (*bzero_1page)(void *);
55
56 extern void ___rw_read_enter(void);
57 extern void ___rw_read_try(void);
58 extern void ___rw_read_exit(void);
59 extern void ___rw_write_enter(void);
60
61 /* Networking helper routines. */
62 EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
63
64 /* Special internal versions of library functions. */
65 EXPORT_SYMBOL(__copy_1page);
66 EXPORT_SYMBOL(__memmove);
67 EXPORT_SYMBOL(bzero_1page);
68
69 /* Moving data to/from/in userspace. */
70 EXPORT_SYMBOL(__copy_user);
71
72 /* Used by asm/spinlock.h */
73 #ifdef CONFIG_SMP
74 EXPORT_SYMBOL(___rw_read_enter);
75 EXPORT_SYMBOL(___rw_read_try);
76 EXPORT_SYMBOL(___rw_read_exit);
77 EXPORT_SYMBOL(___rw_write_enter);
78 #endif
79
80 EXPORT_SYMBOL(__ashrdi3);
81 EXPORT_SYMBOL(__ashldi3);
82 EXPORT_SYMBOL(__lshrdi3);
83 EXPORT_SYMBOL(__muldi3);
84 EXPORT_SYMBOL(__divdi3);
85 #endif
86
87 /*
88  * sparc64
89  */
90 #ifdef CONFIG_SPARC64
91 /* Networking helper routines. */
92 EXPORT_SYMBOL(csum_partial_copy_nocheck);
93 EXPORT_SYMBOL(__csum_partial_copy_from_user);
94 EXPORT_SYMBOL(__csum_partial_copy_to_user);
95 EXPORT_SYMBOL(ip_fast_csum);
96
97 /* Moving data to/from/in userspace. */
98 EXPORT_SYMBOL(___copy_to_user);
99 EXPORT_SYMBOL(___copy_from_user);
100 EXPORT_SYMBOL(___copy_in_user);
101 EXPORT_SYMBOL(__clear_user);
102
103 /* RW semaphores */
104 EXPORT_SYMBOL(__down_read);
105 EXPORT_SYMBOL(__down_read_trylock);
106 EXPORT_SYMBOL(__down_write);
107 EXPORT_SYMBOL(__down_write_trylock);
108 EXPORT_SYMBOL(__up_read);
109 EXPORT_SYMBOL(__up_write);
110 EXPORT_SYMBOL(__downgrade_write);
111
112 /* Atomic counter implementation. */
113 EXPORT_SYMBOL(atomic_add);
114 EXPORT_SYMBOL(atomic_add_ret);
115 EXPORT_SYMBOL(atomic_sub);
116 EXPORT_SYMBOL(atomic_sub_ret);
117 EXPORT_SYMBOL(atomic64_add);
118 EXPORT_SYMBOL(atomic64_add_ret);
119 EXPORT_SYMBOL(atomic64_sub);
120 EXPORT_SYMBOL(atomic64_sub_ret);
121
122 /* Atomic bit operations. */
123 EXPORT_SYMBOL(test_and_set_bit);
124 EXPORT_SYMBOL(test_and_clear_bit);
125 EXPORT_SYMBOL(test_and_change_bit);
126 EXPORT_SYMBOL(set_bit);
127 EXPORT_SYMBOL(clear_bit);
128 EXPORT_SYMBOL(change_bit);
129
130 /* Special internal versions of library functions. */
131 EXPORT_SYMBOL(_clear_page);
132 EXPORT_SYMBOL(clear_user_page);
133 EXPORT_SYMBOL(copy_user_page);
134
135 /* RAID code needs this */
136 void VISenter(void);
137 EXPORT_SYMBOL(VISenter);
138
139 extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
140 extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
141                 unsigned long *);
142 extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
143                 unsigned long *, unsigned long *);
144 extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
145                 unsigned long *, unsigned long *, unsigned long *);
146 EXPORT_SYMBOL(xor_vis_2);
147 EXPORT_SYMBOL(xor_vis_3);
148 EXPORT_SYMBOL(xor_vis_4);
149 EXPORT_SYMBOL(xor_vis_5);
150
151 extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
152 extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
153                 unsigned long *);
154 extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
155                 unsigned long *, unsigned long *);
156 extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
157                 unsigned long *, unsigned long *, unsigned long *);
158
159 EXPORT_SYMBOL(xor_niagara_2);
160 EXPORT_SYMBOL(xor_niagara_3);
161 EXPORT_SYMBOL(xor_niagara_4);
162 EXPORT_SYMBOL(xor_niagara_5);
163 #endif