blob: de5e97817bdb6be31fd95f63030112035b766b27 [file] [log] [blame]
Sam Ravnborg45536ff2009-01-08 16:57:35 -08001/*
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 */
17EXPORT_SYMBOL(strlen);
Sam Ravnborg45536ff2009-01-08 16:57:35 -080018EXPORT_SYMBOL(strncmp);
19
20/* mem* functions */
21extern void *__memscan_zero(void *, size_t);
22extern void *__memscan_generic(void *, int, size_t);
23extern void *__bzero(void *, size_t);
24
25EXPORT_SYMBOL(memscan);
26EXPORT_SYMBOL(__memscan_zero);
27EXPORT_SYMBOL(__memscan_generic);
28EXPORT_SYMBOL(memcmp);
29EXPORT_SYMBOL(memcpy);
30EXPORT_SYMBOL(memset);
Sam Ravnborg45536ff2009-01-08 16:57:35 -080031EXPORT_SYMBOL(memmove);
32EXPORT_SYMBOL(__bzero);
33
Sam Ravnborg45536ff2009-01-08 16:57:35 -080034/* Networking helper routines. */
35EXPORT_SYMBOL(csum_partial);
36
37#ifdef CONFIG_MCOUNT
38EXPORT_SYMBOL(_mcount);
39#endif
40
41/*
42 * sparc
43 */
44#ifdef CONFIG_SPARC32
45extern int __ashrdi3(int, int);
46extern int __ashldi3(int, int);
47extern int __lshrdi3(int, int);
48extern int __muldi3(int, int);
49extern int __divdi3(int, int);
50
51extern void (*__copy_1page)(void *, const void *);
52extern void (*bzero_1page)(void *);
53
Sam Ravnborg45536ff2009-01-08 16:57:35 -080054extern void ___rw_read_enter(void);
55extern void ___rw_read_try(void);
56extern void ___rw_read_exit(void);
57extern void ___rw_write_enter(void);
Sam Ravnborg45536ff2009-01-08 16:57:35 -080058
Sam Ravnborg45536ff2009-01-08 16:57:35 -080059/* Networking helper routines. */
60EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
61
62/* Special internal versions of library functions. */
63EXPORT_SYMBOL(__copy_1page);
Sam Ravnborg45536ff2009-01-08 16:57:35 -080064EXPORT_SYMBOL(__memmove);
65EXPORT_SYMBOL(bzero_1page);
66
Sam Ravnborg45536ff2009-01-08 16:57:35 -080067/* Moving data to/from/in userspace. */
68EXPORT_SYMBOL(__copy_user);
69
70/* Used by asm/spinlock.h */
71#ifdef CONFIG_SMP
72EXPORT_SYMBOL(___rw_read_enter);
73EXPORT_SYMBOL(___rw_read_try);
74EXPORT_SYMBOL(___rw_read_exit);
75EXPORT_SYMBOL(___rw_write_enter);
76#endif
77
Sam Ravnborg45536ff2009-01-08 16:57:35 -080078EXPORT_SYMBOL(__ashrdi3);
79EXPORT_SYMBOL(__ashldi3);
80EXPORT_SYMBOL(__lshrdi3);
81EXPORT_SYMBOL(__muldi3);
82EXPORT_SYMBOL(__divdi3);
Sam Ravnborg45536ff2009-01-08 16:57:35 -080083#endif
84
85/*
86 * sparc64
87 */
88#ifdef CONFIG_SPARC64
89/* Networking helper routines. */
90EXPORT_SYMBOL(csum_partial_copy_nocheck);
91EXPORT_SYMBOL(__csum_partial_copy_from_user);
92EXPORT_SYMBOL(__csum_partial_copy_to_user);
93EXPORT_SYMBOL(ip_fast_csum);
94
95/* Moving data to/from/in userspace. */
96EXPORT_SYMBOL(___copy_to_user);
97EXPORT_SYMBOL(___copy_from_user);
98EXPORT_SYMBOL(___copy_in_user);
99EXPORT_SYMBOL(__clear_user);
100
Sam Ravnborg45536ff2009-01-08 16:57:35 -0800101/* Atomic counter implementation. */
Peter Zijlstra4f3316c2014-03-26 18:29:28 +0100102#define ATOMIC_OP(op) \
103EXPORT_SYMBOL(atomic_##op); \
104EXPORT_SYMBOL(atomic64_##op);
105
106#define ATOMIC_OP_RETURN(op) \
107EXPORT_SYMBOL(atomic_##op##_return); \
108EXPORT_SYMBOL(atomic64_##op##_return);
109
Peter Zijlstra3a1adb22016-04-18 01:16:04 +0200110#define ATOMIC_FETCH_OP(op) \
111EXPORT_SYMBOL(atomic_fetch_##op); \
112EXPORT_SYMBOL(atomic64_fetch_##op);
113
114#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op)
Peter Zijlstra4f3316c2014-03-26 18:29:28 +0100115
116ATOMIC_OPS(add)
117ATOMIC_OPS(sub)
118
119#undef ATOMIC_OPS
Peter Zijlstra3a1adb22016-04-18 01:16:04 +0200120#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
121
122ATOMIC_OPS(and)
123ATOMIC_OPS(or)
124ATOMIC_OPS(xor)
125
126#undef ATOMIC_OPS
127#undef ATOMIC_FETCH_OP
Peter Zijlstra4f3316c2014-03-26 18:29:28 +0100128#undef ATOMIC_OP_RETURN
129#undef ATOMIC_OP
130
David S. Miller193d2aa2012-11-09 19:37:59 -0800131EXPORT_SYMBOL(atomic64_dec_if_positive);
Sam Ravnborg45536ff2009-01-08 16:57:35 -0800132
133/* Atomic bit operations. */
134EXPORT_SYMBOL(test_and_set_bit);
135EXPORT_SYMBOL(test_and_clear_bit);
136EXPORT_SYMBOL(test_and_change_bit);
137EXPORT_SYMBOL(set_bit);
138EXPORT_SYMBOL(clear_bit);
139EXPORT_SYMBOL(change_bit);
140
141/* Special internal versions of library functions. */
142EXPORT_SYMBOL(_clear_page);
143EXPORT_SYMBOL(clear_user_page);
144EXPORT_SYMBOL(copy_user_page);
145
146/* RAID code needs this */
147void VISenter(void);
148EXPORT_SYMBOL(VISenter);
149
Sam Ravnborg45536ff2009-01-08 16:57:35 -0800150extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
151extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
152 unsigned long *);
153extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
154 unsigned long *, unsigned long *);
155extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
156 unsigned long *, unsigned long *, unsigned long *);
157EXPORT_SYMBOL(xor_vis_2);
158EXPORT_SYMBOL(xor_vis_3);
159EXPORT_SYMBOL(xor_vis_4);
160EXPORT_SYMBOL(xor_vis_5);
161
162extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
163extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
164 unsigned long *);
165extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
166 unsigned long *, unsigned long *);
167extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
168 unsigned long *, unsigned long *, unsigned long *);
169
170EXPORT_SYMBOL(xor_niagara_2);
171EXPORT_SYMBOL(xor_niagara_3);
172EXPORT_SYMBOL(xor_niagara_4);
173EXPORT_SYMBOL(xor_niagara_5);
174#endif