diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-02-13 07:57:10 -0500 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2013-03-02 15:11:15 -0500 |
commit | 9da3ee9aa8a9c9fcf94188d4c0ae280afbeb63c1 (patch) | |
tree | b6c3890534b2b3ee49fda2bc5a342030378e4079 | |
parent | 7293dbed9d8be1916034dbfcf2f203e96bd8fae1 (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.c | 16 | ||||
-rw-r--r-- | arch/metag/lib/usercopy.c | 13 |
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 */ | ||
15 | EXPORT_SYMBOL(__copy_user_zeroing); | ||
16 | EXPORT_SYMBOL(__copy_user); | ||
17 | EXPORT_SYMBOL(__get_user_asm_b); | ||
18 | EXPORT_SYMBOL(__get_user_asm_w); | ||
19 | EXPORT_SYMBOL(__get_user_asm_d); | ||
20 | EXPORT_SYMBOL(__put_user_asm_b); | ||
21 | EXPORT_SYMBOL(__put_user_asm_w); | ||
22 | EXPORT_SYMBOL(__put_user_asm_d); | ||
23 | EXPORT_SYMBOL(__put_user_asm_l); | ||
24 | EXPORT_SYMBOL(__strncpy_from_user); | ||
25 | EXPORT_SYMBOL(strnlen_user); | ||
26 | EXPORT_SYMBOL(__do_clear_user); | ||
27 | |||
28 | EXPORT_SYMBOL(clear_page); | 12 | EXPORT_SYMBOL(clear_page); |
29 | EXPORT_SYMBOL(copy_page); | 13 | EXPORT_SYMBOL(copy_page); |
30 | EXPORT_SYMBOL(empty_zero_page); | 14 | EXPORT_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 | } |
614 | EXPORT_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 | } |
941 | EXPORT_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 | } |
1095 | EXPORT_SYMBOL(__do_clear_user); | ||
1092 | 1096 | ||
1093 | unsigned char __get_user_asm_b(const void __user *addr, long *err) | 1097 | unsigned 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 | } |
1119 | EXPORT_SYMBOL(__get_user_asm_b); | ||
1115 | 1120 | ||
1116 | unsigned short __get_user_asm_w(const void __user *addr, long *err) | 1121 | unsigned 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 | } |
1143 | EXPORT_SYMBOL(__get_user_asm_w); | ||
1138 | 1144 | ||
1139 | unsigned int __get_user_asm_d(const void __user *addr, long *err) | 1145 | unsigned 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 | } |
1167 | EXPORT_SYMBOL(__get_user_asm_d); | ||
1161 | 1168 | ||
1162 | long __put_user_asm_b(unsigned int x, void __user *addr) | 1169 | long __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 | } |
1191 | EXPORT_SYMBOL(__put_user_asm_b); | ||
1184 | 1192 | ||
1185 | long __put_user_asm_w(unsigned int x, void __user *addr) | 1193 | long __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 | } |
1215 | EXPORT_SYMBOL(__put_user_asm_w); | ||
1207 | 1216 | ||
1208 | long __put_user_asm_d(unsigned int x, void __user *addr) | 1217 | long __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 | } |
1239 | EXPORT_SYMBOL(__put_user_asm_d); | ||
1230 | 1240 | ||
1231 | long __put_user_asm_l(unsigned long long x, void __user *addr) | 1241 | long __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 | } |
1263 | EXPORT_SYMBOL(__put_user_asm_l); | ||
1253 | 1264 | ||
1254 | long strnlen_user(const char __user *src, long count) | 1265 | long 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 | } |
1300 | EXPORT_SYMBOL(strnlen_user); | ||
1289 | 1301 | ||
1290 | long __strncpy_from_user(char *dst, const char __user *src, long count) | 1302 | long __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 | } |
1354 | EXPORT_SYMBOL(__strncpy_from_user); | ||