aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-02-13 07:57:10 -0500
committerJames Hogan <james.hogan@imgtec.com>2013-03-02 15:11:15 -0500
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 8ce3c3df2028..3d60cf31e264 100644
--- a/arch/metag/kernel/metag_ksyms.c
+++ b/arch/metag/kernel/metag_ksyms.c
@@ -2,29 +2,13 @@
2#include <linux/linkage.h> 2#include <linux/linkage.h>
3#include <linux/string.h> 3#include <linux/string.h>
4#include <linux/mm.h> 4#include <linux/mm.h>
5#include <linux/user.h>
6#include <linux/interrupt.h> 5#include <linux/interrupt.h>
7#include <linux/hardirq.h> 6#include <linux/hardirq.h>
8 7
9#include <asm/checksum.h> 8#include <asm/checksum.h>
10#include <asm/uaccess.h>
11#include <asm/ftrace.h> 9#include <asm/ftrace.h>
12#include <asm/tbx.h> 10#include <asm/tbx.h>
13 11
14/* uaccess symbols */
15EXPORT_SYMBOL(__copy_user_zeroing);
16EXPORT_SYMBOL(__copy_user);
17EXPORT_SYMBOL(__get_user_asm_b);
18EXPORT_SYMBOL(__get_user_asm_w);
19EXPORT_SYMBOL(__get_user_asm_d);
20EXPORT_SYMBOL(__put_user_asm_b);
21EXPORT_SYMBOL(__put_user_asm_w);
22EXPORT_SYMBOL(__put_user_asm_d);
23EXPORT_SYMBOL(__put_user_asm_l);
24EXPORT_SYMBOL(__strncpy_from_user);
25EXPORT_SYMBOL(strnlen_user);
26EXPORT_SYMBOL(__do_clear_user);
27
28EXPORT_SYMBOL(clear_page); 12EXPORT_SYMBOL(clear_page);
29EXPORT_SYMBOL(copy_page); 13EXPORT_SYMBOL(copy_page);
30EXPORT_SYMBOL(empty_zero_page); 14EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/metag/lib/usercopy.c b/arch/metag/lib/usercopy.c
index 92f6dbb34e83..b3ebfe9c8e88 100644
--- a/arch/metag/lib/usercopy.c
+++ b/arch/metag/lib/usercopy.c
@@ -10,6 +10,7 @@
10 * Modified for Meta by Will Newton. 10 * Modified for Meta by Will Newton.
11 */ 11 */
12 12
13#include <linux/export.h>
13#include <linux/uaccess.h> 14#include <linux/uaccess.h>
14#include <asm/cache.h> /* def of L1_CACHE_BYTES */ 15#include <asm/cache.h> /* def of L1_CACHE_BYTES */
15 16
@@ -610,6 +611,7 @@ unsigned long __copy_user(void __user *pdst, const void *psrc,
610 611
611 return retn; 612 return retn;
612} 613}
614EXPORT_SYMBOL(__copy_user);
613 615
614#define __asm_copy_from_user_1(to, from, ret) \ 616#define __asm_copy_from_user_1(to, from, ret) \
615 __asm_copy_user_cont(to, from, ret, \ 617 __asm_copy_user_cont(to, from, ret, \
@@ -936,6 +938,7 @@ unsigned long __copy_user_zeroing(void *pdst, const void __user *psrc,
936 938
937 return retn + n; 939 return retn + n;
938} 940}
941EXPORT_SYMBOL(__copy_user_zeroing);
939 942
940#define __asm_clear_8x64(to, ret) \ 943#define __asm_clear_8x64(to, ret) \
941 asm volatile ( \ 944 asm volatile ( \
@@ -1089,6 +1092,7 @@ unsigned long __do_clear_user(void __user *pto, unsigned long pn)
1089 1092
1090 return retn; 1093 return retn;
1091} 1094}
1095EXPORT_SYMBOL(__do_clear_user);
1092 1096
1093unsigned char __get_user_asm_b(const void __user *addr, long *err) 1097unsigned char __get_user_asm_b(const void __user *addr, long *err)
1094{ 1098{
@@ -1112,6 +1116,7 @@ unsigned char __get_user_asm_b(const void __user *addr, long *err)
1112 : "D0FrT"); 1116 : "D0FrT");
1113 return x; 1117 return x;
1114} 1118}
1119EXPORT_SYMBOL(__get_user_asm_b);
1115 1120
1116unsigned short __get_user_asm_w(const void __user *addr, long *err) 1121unsigned short __get_user_asm_w(const void __user *addr, long *err)
1117{ 1122{
@@ -1135,6 +1140,7 @@ unsigned short __get_user_asm_w(const void __user *addr, long *err)
1135 : "D0FrT"); 1140 : "D0FrT");
1136 return x; 1141 return x;
1137} 1142}
1143EXPORT_SYMBOL(__get_user_asm_w);
1138 1144
1139unsigned int __get_user_asm_d(const void __user *addr, long *err) 1145unsigned int __get_user_asm_d(const void __user *addr, long *err)
1140{ 1146{
@@ -1158,6 +1164,7 @@ unsigned int __get_user_asm_d(const void __user *addr, long *err)
1158 : "D0FrT"); 1164 : "D0FrT");
1159 return x; 1165 return x;
1160} 1166}
1167EXPORT_SYMBOL(__get_user_asm_d);
1161 1168
1162long __put_user_asm_b(unsigned int x, void __user *addr) 1169long __put_user_asm_b(unsigned int x, void __user *addr)
1163{ 1170{
@@ -1181,6 +1188,7 @@ long __put_user_asm_b(unsigned int x, void __user *addr)
1181 : "D0FrT"); 1188 : "D0FrT");
1182 return err; 1189 return err;
1183} 1190}
1191EXPORT_SYMBOL(__put_user_asm_b);
1184 1192
1185long __put_user_asm_w(unsigned int x, void __user *addr) 1193long __put_user_asm_w(unsigned int x, void __user *addr)
1186{ 1194{
@@ -1204,6 +1212,7 @@ long __put_user_asm_w(unsigned int x, void __user *addr)
1204 : "D0FrT"); 1212 : "D0FrT");
1205 return err; 1213 return err;
1206} 1214}
1215EXPORT_SYMBOL(__put_user_asm_w);
1207 1216
1208long __put_user_asm_d(unsigned int x, void __user *addr) 1217long __put_user_asm_d(unsigned int x, void __user *addr)
1209{ 1218{
@@ -1227,6 +1236,7 @@ long __put_user_asm_d(unsigned int x, void __user *addr)
1227 : "D0FrT"); 1236 : "D0FrT");
1228 return err; 1237 return err;
1229} 1238}
1239EXPORT_SYMBOL(__put_user_asm_d);
1230 1240
1231long __put_user_asm_l(unsigned long long x, void __user *addr) 1241long __put_user_asm_l(unsigned long long x, void __user *addr)
1232{ 1242{
@@ -1250,6 +1260,7 @@ long __put_user_asm_l(unsigned long long x, void __user *addr)
1250 : "D0FrT"); 1260 : "D0FrT");
1251 return err; 1261 return err;
1252} 1262}
1263EXPORT_SYMBOL(__put_user_asm_l);
1253 1264
1254long strnlen_user(const char __user *src, long count) 1265long strnlen_user(const char __user *src, long count)
1255{ 1266{
@@ -1286,6 +1297,7 @@ long strnlen_user(const char __user *src, long count)
1286 1297
1287 return res; 1298 return res;
1288} 1299}
1300EXPORT_SYMBOL(strnlen_user);
1289 1301
1290long __strncpy_from_user(char *dst, const char __user *src, long count) 1302long __strncpy_from_user(char *dst, const char __user *src, long count)
1291{ 1303{
@@ -1339,3 +1351,4 @@ long __strncpy_from_user(char *dst, const char __user *src, long count)
1339 1351
1340 return res; 1352 return res;
1341} 1353}
1354EXPORT_SYMBOL(__strncpy_from_user);