diff options
author | Jesper Nilsson <jespern@axis.com> | 2014-10-07 06:20:47 -0400 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2014-12-19 18:03:22 -0500 |
commit | dbd3c7e1bfb1e4319402eda23e04cc08dd26c50e (patch) | |
tree | 5d805b65faeabbe24812adc88206be0ad7925180 /arch/cris | |
parent | 82e6df1e86e5c09d610df3da7524ea951b2ad458 (diff) |
CRIS: Export missing function symbols
strcmp was lost when all other string functions were removed,
but we still have an optimized version for this on CRISv32,
so any driver built as a module would not have access to this symbol.
In a similar manner, we had optimized versions of
csum_partial_copy_from_user and __do_clear_user
but no exported symbols for them, breaking bunch of other drivers
when built as a module.
At the same time, move EXPORT_SYMBOL(__copy_user) and
EXPORT_SYMBOL(__copy_user_zeroing) C-files so it's
located together with the function definition.
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/arch-v10/lib/usercopy.c | 14 | ||||
-rw-r--r-- | arch/cris/arch-v32/lib/usercopy.c | 15 | ||||
-rw-r--r-- | arch/cris/kernel/crisksyms.c | 9 |
3 files changed, 19 insertions, 19 deletions
diff --git a/arch/cris/arch-v10/lib/usercopy.c b/arch/cris/arch-v10/lib/usercopy.c index b0a608da7bd1..b964c667aced 100644 --- a/arch/cris/arch-v10/lib/usercopy.c +++ b/arch/cris/arch-v10/lib/usercopy.c | |||
@@ -30,8 +30,7 @@ | |||
30 | /* Copy to userspace. This is based on the memcpy used for | 30 | /* Copy to userspace. This is based on the memcpy used for |
31 | kernel-to-kernel copying; see "string.c". */ | 31 | kernel-to-kernel copying; see "string.c". */ |
32 | 32 | ||
33 | unsigned long | 33 | unsigned long __copy_user(void __user *pdst, const void *psrc, unsigned long pn) |
34 | __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | ||
35 | { | 34 | { |
36 | /* We want the parameters put in special registers. | 35 | /* We want the parameters put in special registers. |
37 | Make sure the compiler is able to make something useful of this. | 36 | Make sure the compiler is able to make something useful of this. |
@@ -187,13 +186,14 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | |||
187 | 186 | ||
188 | return retn; | 187 | return retn; |
189 | } | 188 | } |
189 | EXPORT_SYMBOL(__copy_user); | ||
190 | 190 | ||
191 | /* Copy from user to kernel, zeroing the bytes that were inaccessible in | 191 | /* Copy from user to kernel, zeroing the bytes that were inaccessible in |
192 | userland. The return-value is the number of bytes that were | 192 | userland. The return-value is the number of bytes that were |
193 | inaccessible. */ | 193 | inaccessible. */ |
194 | 194 | ||
195 | unsigned long | 195 | unsigned long __copy_user_zeroing(void *pdst, const void __user *psrc, |
196 | __copy_user_zeroing(void *pdst, const void __user *psrc, unsigned long pn) | 196 | unsigned long pn) |
197 | { | 197 | { |
198 | /* We want the parameters put in special registers. | 198 | /* We want the parameters put in special registers. |
199 | Make sure the compiler is able to make something useful of this. | 199 | Make sure the compiler is able to make something useful of this. |
@@ -369,11 +369,10 @@ copy_exception_bytes: | |||
369 | 369 | ||
370 | return retn + n; | 370 | return retn + n; |
371 | } | 371 | } |
372 | EXPORT_SYMBOL(__copy_user_zeroing); | ||
372 | 373 | ||
373 | /* Zero userspace. */ | 374 | /* Zero userspace. */ |
374 | 375 | unsigned long __do_clear_user(void __user *pto, unsigned long pn) | |
375 | unsigned long | ||
376 | __do_clear_user (void __user *pto, unsigned long pn) | ||
377 | { | 376 | { |
378 | /* We want the parameters put in special registers. | 377 | /* We want the parameters put in special registers. |
379 | Make sure the compiler is able to make something useful of this. | 378 | Make sure the compiler is able to make something useful of this. |
@@ -521,3 +520,4 @@ __do_clear_user (void __user *pto, unsigned long pn) | |||
521 | 520 | ||
522 | return retn; | 521 | return retn; |
523 | } | 522 | } |
523 | EXPORT_SYMBOL(__do_clear_user); | ||
diff --git a/arch/cris/arch-v32/lib/usercopy.c b/arch/cris/arch-v32/lib/usercopy.c index 0b5b70d5f58a..f0f335d8aa79 100644 --- a/arch/cris/arch-v32/lib/usercopy.c +++ b/arch/cris/arch-v32/lib/usercopy.c | |||
@@ -26,8 +26,7 @@ | |||
26 | /* Copy to userspace. This is based on the memcpy used for | 26 | /* Copy to userspace. This is based on the memcpy used for |
27 | kernel-to-kernel copying; see "string.c". */ | 27 | kernel-to-kernel copying; see "string.c". */ |
28 | 28 | ||
29 | unsigned long | 29 | unsigned long __copy_user(void __user *pdst, const void *psrc, unsigned long pn) |
30 | __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | ||
31 | { | 30 | { |
32 | /* We want the parameters put in special registers. | 31 | /* We want the parameters put in special registers. |
33 | Make sure the compiler is able to make something useful of this. | 32 | Make sure the compiler is able to make something useful of this. |
@@ -155,13 +154,13 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | |||
155 | 154 | ||
156 | return retn; | 155 | return retn; |
157 | } | 156 | } |
157 | EXPORT_SYMBOL(__copy_user); | ||
158 | 158 | ||
159 | /* Copy from user to kernel, zeroing the bytes that were inaccessible in | 159 | /* Copy from user to kernel, zeroing the bytes that were inaccessible in |
160 | userland. The return-value is the number of bytes that were | 160 | userland. The return-value is the number of bytes that were |
161 | inaccessible. */ | 161 | inaccessible. */ |
162 | 162 | unsigned long __copy_user_zeroing(void *pdst, const void __user *psrc, | |
163 | unsigned long | 163 | unsigned long pn) |
164 | __copy_user_zeroing(void *pdst, const void __user *psrc, unsigned long pn) | ||
165 | { | 164 | { |
166 | /* We want the parameters put in special registers. | 165 | /* We want the parameters put in special registers. |
167 | Make sure the compiler is able to make something useful of this. | 166 | Make sure the compiler is able to make something useful of this. |
@@ -321,11 +320,10 @@ copy_exception_bytes: | |||
321 | 320 | ||
322 | return retn + n; | 321 | return retn + n; |
323 | } | 322 | } |
323 | EXPORT_SYMBOL(__copy_user_zeroing); | ||
324 | 324 | ||
325 | /* Zero userspace. */ | 325 | /* Zero userspace. */ |
326 | 326 | unsigned long __do_clear_user(void __user *pto, unsigned long pn) | |
327 | unsigned long | ||
328 | __do_clear_user (void __user *pto, unsigned long pn) | ||
329 | { | 327 | { |
330 | /* We want the parameters put in special registers. | 328 | /* We want the parameters put in special registers. |
331 | Make sure the compiler is able to make something useful of this. | 329 | Make sure the compiler is able to make something useful of this. |
@@ -468,3 +466,4 @@ __do_clear_user (void __user *pto, unsigned long pn) | |||
468 | 466 | ||
469 | return retn; | 467 | return retn; |
470 | } | 468 | } |
469 | EXPORT_SYMBOL(__do_clear_user); | ||
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c index 5868cee20ebd..3908b942fd4c 100644 --- a/arch/cris/kernel/crisksyms.c +++ b/arch/cris/kernel/crisksyms.c | |||
@@ -47,16 +47,16 @@ EXPORT_SYMBOL(__negdi2); | |||
47 | EXPORT_SYMBOL(__ioremap); | 47 | EXPORT_SYMBOL(__ioremap); |
48 | EXPORT_SYMBOL(iounmap); | 48 | EXPORT_SYMBOL(iounmap); |
49 | 49 | ||
50 | /* Userspace access functions */ | ||
51 | EXPORT_SYMBOL(__copy_user_zeroing); | ||
52 | EXPORT_SYMBOL(__copy_user); | ||
53 | |||
54 | #undef memcpy | 50 | #undef memcpy |
55 | #undef memset | 51 | #undef memset |
56 | extern void * memset(void *, int, __kernel_size_t); | 52 | extern void * memset(void *, int, __kernel_size_t); |
57 | extern void * memcpy(void *, const void *, __kernel_size_t); | 53 | extern void * memcpy(void *, const void *, __kernel_size_t); |
58 | EXPORT_SYMBOL(memcpy); | 54 | EXPORT_SYMBOL(memcpy); |
59 | EXPORT_SYMBOL(memset); | 55 | EXPORT_SYMBOL(memset); |
56 | #ifdef CONFIG_ETRAX_ARCH_V32 | ||
57 | #undef strcmp | ||
58 | EXPORT_SYMBOL(strcmp); | ||
59 | #endif | ||
60 | 60 | ||
61 | #ifdef CONFIG_ETRAX_FAST_TIMER | 61 | #ifdef CONFIG_ETRAX_FAST_TIMER |
62 | /* Fast timer functions */ | 62 | /* Fast timer functions */ |
@@ -66,3 +66,4 @@ EXPORT_SYMBOL(del_fast_timer); | |||
66 | EXPORT_SYMBOL(schedule_usleep); | 66 | EXPORT_SYMBOL(schedule_usleep); |
67 | #endif | 67 | #endif |
68 | EXPORT_SYMBOL(csum_partial); | 68 | EXPORT_SYMBOL(csum_partial); |
69 | EXPORT_SYMBOL(csum_partial_copy_from_user); | ||