diff options
author | Andi Kleen <ak@suse.de> | 2006-06-26 07:59:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:22 -0400 |
commit | 2ee60e17896c65da1df5780d3196c050bccb7d10 (patch) | |
tree | 54b41b23c92a79e44c7f27c697c84c64052cb85d /arch/x86_64/lib | |
parent | 45486f81c9aa07218b73a38cbcf62ffa66e99088 (diff) |
[PATCH] x86_64: Move export symbols to their C functions
Only exports for assembler files are left in x8664_ksyms.c
Originally inspired by a patch from Al Viro
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/lib')
-rw-r--r-- | arch/x86_64/lib/csum-partial.c | 1 | ||||
-rw-r--r-- | arch/x86_64/lib/csum-wrappers.c | 1 | ||||
-rw-r--r-- | arch/x86_64/lib/delay.c | 5 | ||||
-rw-r--r-- | arch/x86_64/lib/memmove.c | 2 | ||||
-rw-r--r-- | arch/x86_64/lib/usercopy.c | 11 |
5 files changed, 19 insertions, 1 deletions
diff --git a/arch/x86_64/lib/csum-partial.c b/arch/x86_64/lib/csum-partial.c index 5384e227cdf6..c493735218da 100644 --- a/arch/x86_64/lib/csum-partial.c +++ b/arch/x86_64/lib/csum-partial.c | |||
@@ -147,4 +147,5 @@ unsigned short ip_compute_csum(unsigned char * buff, int len) | |||
147 | { | 147 | { |
148 | return csum_fold(csum_partial(buff,len,0)); | 148 | return csum_fold(csum_partial(buff,len,0)); |
149 | } | 149 | } |
150 | EXPORT_SYMBOL(ip_compute_csum); | ||
150 | 151 | ||
diff --git a/arch/x86_64/lib/csum-wrappers.c b/arch/x86_64/lib/csum-wrappers.c index 94323f20816e..b1320ec58428 100644 --- a/arch/x86_64/lib/csum-wrappers.c +++ b/arch/x86_64/lib/csum-wrappers.c | |||
@@ -109,6 +109,7 @@ csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int len, | |||
109 | { | 109 | { |
110 | return csum_partial_copy_generic(src,dst,len,sum,NULL,NULL); | 110 | return csum_partial_copy_generic(src,dst,len,sum,NULL,NULL); |
111 | } | 111 | } |
112 | EXPORT_SYMBOL(csum_partial_copy_nocheck); | ||
112 | 113 | ||
113 | unsigned short csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, | 114 | unsigned short csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, |
114 | __u32 len, unsigned short proto, unsigned int sum) | 115 | __u32 len, unsigned short proto, unsigned int sum) |
diff --git a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c index 03c460cbdd1c..b6cd3cca2f45 100644 --- a/arch/x86_64/lib/delay.c +++ b/arch/x86_64/lib/delay.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
12 | #include <linux/module.h> | ||
12 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
13 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
14 | #include <asm/delay.h> | 15 | #include <asm/delay.h> |
@@ -36,18 +37,22 @@ void __delay(unsigned long loops) | |||
36 | } | 37 | } |
37 | while((now-bclock) < loops); | 38 | while((now-bclock) < loops); |
38 | } | 39 | } |
40 | EXPORT_SYMBOL(__delay); | ||
39 | 41 | ||
40 | inline void __const_udelay(unsigned long xloops) | 42 | inline void __const_udelay(unsigned long xloops) |
41 | { | 43 | { |
42 | __delay((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32); | 44 | __delay((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32); |
43 | } | 45 | } |
46 | EXPORT_SYMBOL(__const_udelay); | ||
44 | 47 | ||
45 | void __udelay(unsigned long usecs) | 48 | void __udelay(unsigned long usecs) |
46 | { | 49 | { |
47 | __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ | 50 | __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ |
48 | } | 51 | } |
52 | EXPORT_SYMBOL(__udelay); | ||
49 | 53 | ||
50 | void __ndelay(unsigned long nsecs) | 54 | void __ndelay(unsigned long nsecs) |
51 | { | 55 | { |
52 | __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ | 56 | __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ |
53 | } | 57 | } |
58 | EXPORT_SYMBOL(__ndelay); | ||
diff --git a/arch/x86_64/lib/memmove.c b/arch/x86_64/lib/memmove.c index e93d5255fdc9..517eb1bd9de5 100644 --- a/arch/x86_64/lib/memmove.c +++ b/arch/x86_64/lib/memmove.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #define _STRING_C | 4 | #define _STRING_C |
5 | #include <linux/string.h> | 5 | #include <linux/string.h> |
6 | #include <linux/module.h> | ||
6 | 7 | ||
7 | #undef memmove | 8 | #undef memmove |
8 | void *memmove(void * dest,const void *src,size_t count) | 9 | void *memmove(void * dest,const void *src,size_t count) |
@@ -17,3 +18,4 @@ void *memmove(void * dest,const void *src,size_t count) | |||
17 | } | 18 | } |
18 | return dest; | 19 | return dest; |
19 | } | 20 | } |
21 | EXPORT_SYMBOL(memmove); | ||
diff --git a/arch/x86_64/lib/usercopy.c b/arch/x86_64/lib/usercopy.c index 9bc2c295818e..a82bfacdb1af 100644 --- a/arch/x86_64/lib/usercopy.c +++ b/arch/x86_64/lib/usercopy.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Copyright 1997 Linus Torvalds | 5 | * Copyright 1997 Linus Torvalds |
6 | * Copyright 2002 Andi Kleen <ak@suse.de> | 6 | * Copyright 2002 Andi Kleen <ak@suse.de> |
7 | */ | 7 | */ |
8 | #include <linux/module.h> | ||
8 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
9 | 10 | ||
10 | /* | 11 | /* |
@@ -47,6 +48,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count) | |||
47 | __do_strncpy_from_user(dst, src, count, res); | 48 | __do_strncpy_from_user(dst, src, count, res); |
48 | return res; | 49 | return res; |
49 | } | 50 | } |
51 | EXPORT_SYMBOL(__strncpy_from_user); | ||
50 | 52 | ||
51 | long | 53 | long |
52 | strncpy_from_user(char *dst, const char __user *src, long count) | 54 | strncpy_from_user(char *dst, const char __user *src, long count) |
@@ -56,6 +58,7 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
56 | __do_strncpy_from_user(dst, src, count, res); | 58 | __do_strncpy_from_user(dst, src, count, res); |
57 | return res; | 59 | return res; |
58 | } | 60 | } |
61 | EXPORT_SYMBOL(strncpy_from_user); | ||
59 | 62 | ||
60 | /* | 63 | /* |
61 | * Zero Userspace | 64 | * Zero Userspace |
@@ -94,7 +97,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) | |||
94 | [zero] "r" (0UL), [eight] "r" (8UL)); | 97 | [zero] "r" (0UL), [eight] "r" (8UL)); |
95 | return size; | 98 | return size; |
96 | } | 99 | } |
97 | 100 | EXPORT_SYMBOL(__clear_user); | |
98 | 101 | ||
99 | unsigned long clear_user(void __user *to, unsigned long n) | 102 | unsigned long clear_user(void __user *to, unsigned long n) |
100 | { | 103 | { |
@@ -102,6 +105,7 @@ unsigned long clear_user(void __user *to, unsigned long n) | |||
102 | return __clear_user(to, n); | 105 | return __clear_user(to, n); |
103 | return n; | 106 | return n; |
104 | } | 107 | } |
108 | EXPORT_SYMBOL(clear_user); | ||
105 | 109 | ||
106 | /* | 110 | /* |
107 | * Return the size of a string (including the ending 0) | 111 | * Return the size of a string (including the ending 0) |
@@ -125,6 +129,7 @@ long __strnlen_user(const char __user *s, long n) | |||
125 | s++; | 129 | s++; |
126 | } | 130 | } |
127 | } | 131 | } |
132 | EXPORT_SYMBOL(__strnlen_user); | ||
128 | 133 | ||
129 | long strnlen_user(const char __user *s, long n) | 134 | long strnlen_user(const char __user *s, long n) |
130 | { | 135 | { |
@@ -132,6 +137,7 @@ long strnlen_user(const char __user *s, long n) | |||
132 | return 0; | 137 | return 0; |
133 | return __strnlen_user(s, n); | 138 | return __strnlen_user(s, n); |
134 | } | 139 | } |
140 | EXPORT_SYMBOL(strnlen_user); | ||
135 | 141 | ||
136 | long strlen_user(const char __user *s) | 142 | long strlen_user(const char __user *s) |
137 | { | 143 | { |
@@ -147,6 +153,7 @@ long strlen_user(const char __user *s) | |||
147 | s++; | 153 | s++; |
148 | } | 154 | } |
149 | } | 155 | } |
156 | EXPORT_SYMBOL(strlen_user); | ||
150 | 157 | ||
151 | unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) | 158 | unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) |
152 | { | 159 | { |
@@ -155,3 +162,5 @@ unsigned long copy_in_user(void __user *to, const void __user *from, unsigned le | |||
155 | } | 162 | } |
156 | return len; | 163 | return len; |
157 | } | 164 | } |
165 | EXPORT_SYMBOL(copy_in_user); | ||
166 | |||