aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-02-13 12:57:10 +0000
committerJames Hogan <james.hogan@imgtec.com>2013-03-02 20:11:15 +0000
commit9da3ee9aa8a9c9fcf94188d4c0ae280afbeb63c1 (patch)
treeb6c3890534b2b3ee49fda2bc5a342030378e4079
parent7293dbed9d8be1916034dbfcf2f203e96bd8fae1 (diff)
metag: move usercopy.c exports out of metag_ksyms.c
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in usercopy.c into usercopy.c Signed-off-by: James Hogan <james.hogan@imgtec.com>
-rw-r--r--arch/metag/kernel/metag_ksyms.c16
-rw-r--r--arch/metag/lib/usercopy.c13
2 files changed, 13 insertions, 16 deletions
diff --git a/arch/metag/kernel/metag_ksyms.c b/arch/metag/kernel/metag_ksyms.c
index 8ce3c3df202..3d60cf31e26 100644
--- a/arch/metag/kernel/metag_ksyms.c
+++ b/arch/metag/kernel/metag_ksyms.c
@@ -2,29 +2,13 @@
#include <linux/linkage.h>
#include <linux/string.h>
#include <linux/mm.h>
-#include <linux/user.h>
#include <linux/interrupt.h>
#include <linux/hardirq.h>
#include <asm/checksum.h>
-#include <asm/uaccess.h>
#include <asm/ftrace.h>
#include <asm/tbx.h>
-/* uaccess symbols */
-EXPORT_SYMBOL(__copy_user_zeroing);
-EXPORT_SYMBOL(__copy_user);
-EXPORT_SYMBOL(__get_user_asm_b);
-EXPORT_SYMBOL(__get_user_asm_w);
-EXPORT_SYMBOL(__get_user_asm_d);
-EXPORT_SYMBOL(__put_user_asm_b);
-EXPORT_SYMBOL(__put_user_asm_w);
-EXPORT_SYMBOL(__put_user_asm_d);
-EXPORT_SYMBOL(__put_user_asm_l);
-EXPORT_SYMBOL(__strncpy_from_user);
-EXPORT_SYMBOL(strnlen_user);
-EXPORT_SYMBOL(__do_clear_user);
-
EXPORT_SYMBOL(clear_page);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/metag/lib/usercopy.c b/arch/metag/lib/usercopy.c
index 92f6dbb34e8..b3ebfe9c8e8 100644
--- a/arch/metag/lib/usercopy.c
+++ b/arch/metag/lib/usercopy.c
@@ -10,6 +10,7 @@
* Modified for Meta by Will Newton.
*/
+#include <linux/export.h>
#include <linux/uaccess.h>
#include <asm/cache.h> /* def of L1_CACHE_BYTES */
@@ -610,6 +611,7 @@ unsigned long __copy_user(void __user *pdst, const void *psrc,
return retn;
}
+EXPORT_SYMBOL(__copy_user);
#define __asm_copy_from_user_1(to, from, ret) \
__asm_copy_user_cont(to, from, ret, \
@@ -936,6 +938,7 @@ unsigned long __copy_user_zeroing(void *pdst, const void __user *psrc,
return retn + n;
}
+EXPORT_SYMBOL(__copy_user_zeroing);
#define __asm_clear_8x64(to, ret) \
asm volatile ( \
@@ -1089,6 +1092,7 @@ unsigned long __do_clear_user(void __user *pto, unsigned long pn)
return retn;
}
+EXPORT_SYMBOL(__do_clear_user);
unsigned char __get_user_asm_b(const void __user *addr, long *err)
{
@@ -1112,6 +1116,7 @@ unsigned char __get_user_asm_b(const void __user *addr, long *err)
: "D0FrT");
return x;
}
+EXPORT_SYMBOL(__get_user_asm_b);
unsigned short __get_user_asm_w(const void __user *addr, long *err)
{
@@ -1135,6 +1140,7 @@ unsigned short __get_user_asm_w(const void __user *addr, long *err)
: "D0FrT");
return x;
}
+EXPORT_SYMBOL(__get_user_asm_w);
unsigned int __get_user_asm_d(const void __user *addr, long *err)
{
@@ -1158,6 +1164,7 @@ unsigned int __get_user_asm_d(const void __user *addr, long *err)
: "D0FrT");
return x;
}
+EXPORT_SYMBOL(__get_user_asm_d);
long __put_user_asm_b(unsigned int x, void __user *addr)
{
@@ -1181,6 +1188,7 @@ long __put_user_asm_b(unsigned int x, void __user *addr)
: "D0FrT");
return err;
}
+EXPORT_SYMBOL(__put_user_asm_b);
long __put_user_asm_w(unsigned int x, void __user *addr)
{
@@ -1204,6 +1212,7 @@ long __put_user_asm_w(unsigned int x, void __user *addr)
: "D0FrT");
return err;
}
+EXPORT_SYMBOL(__put_user_asm_w);
long __put_user_asm_d(unsigned int x, void __user *addr)
{
@@ -1227,6 +1236,7 @@ long __put_user_asm_d(unsigned int x, void __user *addr)
: "D0FrT");
return err;
}
+EXPORT_SYMBOL(__put_user_asm_d);
long __put_user_asm_l(unsigned long long x, void __user *addr)
{
@@ -1250,6 +1260,7 @@ long __put_user_asm_l(unsigned long long x, void __user *addr)
: "D0FrT");
return err;
}
+EXPORT_SYMBOL(__put_user_asm_l);
long strnlen_user(const char __user *src, long count)
{
@@ -1286,6 +1297,7 @@ long strnlen_user(const char __user *src, long count)
return res;
}
+EXPORT_SYMBOL(strnlen_user);
long __strncpy_from_user(char *dst, const char __user *src, long count)
{
@@ -1339,3 +1351,4 @@ long __strncpy_from_user(char *dst, const char __user *src, long count)
return res;
}
+EXPORT_SYMBOL(__strncpy_from_user);