diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2011-08-18 15:14:10 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2011-11-02 09:15:36 -0400 |
commit | 73395a0002aa9573ffc8d989587b79663847f705 (patch) | |
tree | 5edb92458670b6ae30c53c47179b60379922c729 /arch | |
parent | a34978cbd977ab62c744f63daacd9dc1474482be (diff) |
um: distribute exports to where exported stuff is defined
ksyms.c is down to the stuff defined in various USER_OBJS
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/exec.c | 18 | ||||
-rw-r--r-- | arch/um/kernel/irq.c | 1 | ||||
-rw-r--r-- | arch/um/kernel/ksyms.c | 38 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/physmem.c | 21 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/skas/uaccess.c | 6 | ||||
-rw-r--r-- | arch/um/kernel/tlb.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/trap.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/um_arch.c | 2 |
10 files changed, 40 insertions, 54 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 939a4a67f0f..6cade936636 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -3,14 +3,15 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/stddef.h" | 6 | #include <linux/stddef.h> |
7 | #include "linux/fs.h" | 7 | #include <linux/module.h> |
8 | #include "linux/ptrace.h" | 8 | #include <linux/fs.h> |
9 | #include "linux/sched.h" | 9 | #include <linux/ptrace.h> |
10 | #include "linux/slab.h" | 10 | #include <linux/sched.h> |
11 | #include "asm/current.h" | 11 | #include <linux/slab.h> |
12 | #include "asm/processor.h" | 12 | #include <asm/current.h> |
13 | #include "asm/uaccess.h" | 13 | #include <asm/processor.h> |
14 | #include <asm/uaccess.h> | ||
14 | #include "as-layout.h" | 15 | #include "as-layout.h" |
15 | #include "mem_user.h" | 16 | #include "mem_user.h" |
16 | #include "skas.h" | 17 | #include "skas.h" |
@@ -41,6 +42,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | |||
41 | PT_REGS_IP(regs) = eip; | 42 | PT_REGS_IP(regs) = eip; |
42 | PT_REGS_SP(regs) = esp; | 43 | PT_REGS_SP(regs) = esp; |
43 | } | 44 | } |
45 | EXPORT_SYMBOL(start_thread); | ||
44 | 46 | ||
45 | static long execve1(const char *file, | 47 | static long execve1(const char *file, |
46 | const char __user *const __user *argv, | 48 | const char __user *const __user *argv, |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 9e485c77030..71b8c947e5e 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -258,6 +258,7 @@ void deactivate_fd(int fd, int irqnum) | |||
258 | 258 | ||
259 | ignore_sigio_fd(fd); | 259 | ignore_sigio_fd(fd); |
260 | } | 260 | } |
261 | EXPORT_SYMBOL(deactivate_fd); | ||
261 | 262 | ||
262 | /* | 263 | /* |
263 | * Called just before shutdown in order to provide a clean exec | 264 | * Called just before shutdown in order to provide a clean exec |
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index 0ae0dfcfbff..e17bea0b22e 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -3,33 +3,11 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/module.h" | 6 | #include <linux/module.h> |
7 | #include "linux/syscalls.h" | ||
8 | #include "asm/tlbflush.h" | ||
9 | #include "asm/uaccess.h" | ||
10 | #include "as-layout.h" | ||
11 | #include "kern_util.h" | ||
12 | #include "mem_user.h" | ||
13 | #include "os.h" | 7 | #include "os.h" |
14 | 8 | ||
15 | EXPORT_SYMBOL(uml_physmem); | ||
16 | EXPORT_SYMBOL(set_signals); | 9 | EXPORT_SYMBOL(set_signals); |
17 | EXPORT_SYMBOL(get_signals); | 10 | EXPORT_SYMBOL(get_signals); |
18 | EXPORT_SYMBOL(kernel_thread); | ||
19 | EXPORT_SYMBOL(sys_waitpid); | ||
20 | EXPORT_SYMBOL(flush_tlb_range); | ||
21 | |||
22 | EXPORT_SYMBOL(high_physmem); | ||
23 | EXPORT_SYMBOL(empty_zero_page); | ||
24 | EXPORT_SYMBOL(handle_page_fault); | ||
25 | EXPORT_SYMBOL(find_iomem); | ||
26 | |||
27 | EXPORT_SYMBOL(strnlen_user); | ||
28 | EXPORT_SYMBOL(strncpy_from_user); | ||
29 | EXPORT_SYMBOL(copy_to_user); | ||
30 | EXPORT_SYMBOL(copy_from_user); | ||
31 | EXPORT_SYMBOL(clear_user); | ||
32 | EXPORT_SYMBOL(uml_strdup); | ||
33 | 11 | ||
34 | EXPORT_SYMBOL(os_stat_fd); | 12 | EXPORT_SYMBOL(os_stat_fd); |
35 | EXPORT_SYMBOL(os_stat_file); | 13 | EXPORT_SYMBOL(os_stat_file); |
@@ -57,24 +35,10 @@ EXPORT_SYMBOL(os_connect_socket); | |||
57 | EXPORT_SYMBOL(os_accept_connection); | 35 | EXPORT_SYMBOL(os_accept_connection); |
58 | EXPORT_SYMBOL(os_rcv_fd); | 36 | EXPORT_SYMBOL(os_rcv_fd); |
59 | EXPORT_SYMBOL(run_helper); | 37 | EXPORT_SYMBOL(run_helper); |
60 | EXPORT_SYMBOL(start_thread); | ||
61 | EXPORT_SYMBOL(os_major); | 38 | EXPORT_SYMBOL(os_major); |
62 | EXPORT_SYMBOL(os_minor); | 39 | EXPORT_SYMBOL(os_minor); |
63 | EXPORT_SYMBOL(os_makedev); | 40 | EXPORT_SYMBOL(os_makedev); |
64 | 41 | ||
65 | EXPORT_SYMBOL(add_sigio_fd); | 42 | EXPORT_SYMBOL(add_sigio_fd); |
66 | EXPORT_SYMBOL(ignore_sigio_fd); | 43 | EXPORT_SYMBOL(ignore_sigio_fd); |
67 | EXPORT_SYMBOL(deactivate_fd); | ||
68 | EXPORT_SYMBOL(sigio_broken); | 44 | EXPORT_SYMBOL(sigio_broken); |
69 | |||
70 | #ifdef CONFIG_SMP | ||
71 | |||
72 | /* required for SMP */ | ||
73 | |||
74 | extern void __write_lock_failed(rwlock_t *rw); | ||
75 | EXPORT_SYMBOL(__write_lock_failed); | ||
76 | |||
77 | extern void __read_lock_failed(rwlock_t *rw); | ||
78 | EXPORT_SYMBOL(__read_lock_failed); | ||
79 | |||
80 | #endif | ||
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 8137ccc9635..ebb86b21844 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
7 | #include <linux/module.h> | ||
7 | #include <linux/bootmem.h> | 8 | #include <linux/bootmem.h> |
8 | #include <linux/highmem.h> | 9 | #include <linux/highmem.h> |
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
@@ -20,6 +21,7 @@ | |||
20 | 21 | ||
21 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ | 22 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ |
22 | unsigned long *empty_zero_page = NULL; | 23 | unsigned long *empty_zero_page = NULL; |
24 | EXPORT_SYMBOL(empty_zero_page); | ||
23 | /* allocated in paging_init and unchanged thereafter */ | 25 | /* allocated in paging_init and unchanged thereafter */ |
24 | static unsigned long *empty_bad_page = NULL; | 26 | static unsigned long *empty_bad_page = NULL; |
25 | 27 | ||
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index a1a9090254c..f116db15d40 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -3,20 +3,22 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/bootmem.h" | 6 | #include <linux/module.h> |
7 | #include "linux/mm.h" | 7 | #include <linux/bootmem.h> |
8 | #include "linux/pfn.h" | 8 | #include <linux/mm.h> |
9 | #include "asm/page.h" | 9 | #include <linux/pfn.h> |
10 | #include "as-layout.h" | 10 | #include <asm/page.h> |
11 | #include "init.h" | 11 | #include <as-layout.h> |
12 | #include "kern.h" | 12 | #include <init.h> |
13 | #include "mem_user.h" | 13 | #include <kern.h> |
14 | #include "os.h" | 14 | #include <mem_user.h> |
15 | #include <os.h> | ||
15 | 16 | ||
16 | static int physmem_fd = -1; | 17 | static int physmem_fd = -1; |
17 | 18 | ||
18 | /* Changed during early boot */ | 19 | /* Changed during early boot */ |
19 | unsigned long high_physmem; | 20 | unsigned long high_physmem; |
21 | EXPORT_SYMBOL(high_physmem); | ||
20 | 22 | ||
21 | extern unsigned long long physmem_size; | 23 | extern unsigned long long physmem_size; |
22 | 24 | ||
@@ -184,6 +186,7 @@ unsigned long find_iomem(char *driver, unsigned long *len_out) | |||
184 | 186 | ||
185 | return 0; | 187 | return 0; |
186 | } | 188 | } |
189 | EXPORT_SYMBOL(find_iomem); | ||
187 | 190 | ||
188 | static int setup_iomem(void) | 191 | static int setup_iomem(void) |
189 | { | 192 | { |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index db44142d126..c5338351aec 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -78,6 +78,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
78 | ¤t->thread.regs, 0, NULL, NULL); | 78 | ¤t->thread.regs, 0, NULL, NULL); |
79 | return pid; | 79 | return pid; |
80 | } | 80 | } |
81 | EXPORT_SYMBOL(kernel_thread); | ||
81 | 82 | ||
82 | static inline void set_current(struct task_struct *task) | 83 | static inline void set_current(struct task_struct *task) |
83 | { | 84 | { |
@@ -286,6 +287,7 @@ char *uml_strdup(const char *string) | |||
286 | { | 287 | { |
287 | return kstrdup(string, GFP_KERNEL); | 288 | return kstrdup(string, GFP_KERNEL); |
288 | } | 289 | } |
290 | EXPORT_SYMBOL(uml_strdup); | ||
289 | 291 | ||
290 | int copy_to_user_proc(void __user *to, void *from, int size) | 292 | int copy_to_user_proc(void __user *to, void *from, int size) |
291 | { | 293 | { |
diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c index 696634214dc..9fefd924fb4 100644 --- a/arch/um/kernel/skas/uaccess.c +++ b/arch/um/kernel/skas/uaccess.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/err.h> | 6 | #include <linux/err.h> |
7 | #include <linux/highmem.h> | 7 | #include <linux/highmem.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/module.h> | ||
9 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
10 | #include <asm/current.h> | 11 | #include <asm/current.h> |
11 | #include <asm/page.h> | 12 | #include <asm/page.h> |
@@ -149,6 +150,7 @@ int copy_from_user(void *to, const void __user *from, int n) | |||
149 | buffer_op((unsigned long) from, n, 0, copy_chunk_from_user, &to): | 150 | buffer_op((unsigned long) from, n, 0, copy_chunk_from_user, &to): |
150 | n; | 151 | n; |
151 | } | 152 | } |
153 | EXPORT_SYMBOL(copy_from_user); | ||
152 | 154 | ||
153 | static int copy_chunk_to_user(unsigned long to, int len, void *arg) | 155 | static int copy_chunk_to_user(unsigned long to, int len, void *arg) |
154 | { | 156 | { |
@@ -170,6 +172,7 @@ int copy_to_user(void __user *to, const void *from, int n) | |||
170 | buffer_op((unsigned long) to, n, 1, copy_chunk_to_user, &from) : | 172 | buffer_op((unsigned long) to, n, 1, copy_chunk_to_user, &from) : |
171 | n; | 173 | n; |
172 | } | 174 | } |
175 | EXPORT_SYMBOL(copy_to_user); | ||
173 | 176 | ||
174 | static int strncpy_chunk_from_user(unsigned long from, int len, void *arg) | 177 | static int strncpy_chunk_from_user(unsigned long from, int len, void *arg) |
175 | { | 178 | { |
@@ -204,6 +207,7 @@ int strncpy_from_user(char *dst, const char __user *src, int count) | |||
204 | return -EFAULT; | 207 | return -EFAULT; |
205 | return strnlen(dst, count); | 208 | return strnlen(dst, count); |
206 | } | 209 | } |
210 | EXPORT_SYMBOL(strncpy_from_user); | ||
207 | 211 | ||
208 | static int clear_chunk(unsigned long addr, int len, void *unused) | 212 | static int clear_chunk(unsigned long addr, int len, void *unused) |
209 | { | 213 | { |
@@ -226,6 +230,7 @@ int clear_user(void __user *mem, int len) | |||
226 | return access_ok(VERIFY_WRITE, mem, len) ? | 230 | return access_ok(VERIFY_WRITE, mem, len) ? |
227 | buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL) : len; | 231 | buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL) : len; |
228 | } | 232 | } |
233 | EXPORT_SYMBOL(clear_user); | ||
229 | 234 | ||
230 | static int strnlen_chunk(unsigned long str, int len, void *arg) | 235 | static int strnlen_chunk(unsigned long str, int len, void *arg) |
231 | { | 236 | { |
@@ -251,3 +256,4 @@ int strnlen_user(const void __user *str, int len) | |||
251 | return count + 1; | 256 | return count + 1; |
252 | return -EFAULT; | 257 | return -EFAULT; |
253 | } | 258 | } |
259 | EXPORT_SYMBOL(strnlen_user); | ||
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 11cadb225f0..7f3d4d86431 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/module.h> | ||
7 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
8 | #include <asm/pgtable.h> | 9 | #include <asm/pgtable.h> |
9 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
@@ -498,6 +499,7 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
498 | flush_tlb_kernel_range_common(start, end); | 499 | flush_tlb_kernel_range_common(start, end); |
499 | else fix_range(vma->vm_mm, start, end, 0); | 500 | else fix_range(vma->vm_mm, start, end, 0); |
500 | } | 501 | } |
502 | EXPORT_SYMBOL(flush_tlb_range); | ||
501 | 503 | ||
502 | void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, | 504 | void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, |
503 | unsigned long end) | 505 | unsigned long end) |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index f2a2036c026..dafc9471595 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/hardirq.h> | 8 | #include <linux/hardirq.h> |
9 | #include <linux/module.h> | ||
9 | #include <asm/current.h> | 10 | #include <asm/current.h> |
10 | #include <asm/pgtable.h> | 11 | #include <asm/pgtable.h> |
11 | #include <asm/tlbflush.h> | 12 | #include <asm/tlbflush.h> |
@@ -111,6 +112,7 @@ out_of_memory: | |||
111 | pagefault_out_of_memory(); | 112 | pagefault_out_of_memory(); |
112 | return 0; | 113 | return 0; |
113 | } | 114 | } |
115 | EXPORT_SYMBOL(handle_page_fault); | ||
114 | 116 | ||
115 | static void show_segv_info(struct uml_pt_regs *regs) | 117 | static void show_segv_info(struct uml_pt_regs *regs) |
116 | { | 118 | { |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 8d84250324b..ba00eae45aa 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -102,6 +102,8 @@ const struct seq_operations cpuinfo_op = { | |||
102 | 102 | ||
103 | /* Set in linux_main */ | 103 | /* Set in linux_main */ |
104 | unsigned long uml_physmem; | 104 | unsigned long uml_physmem; |
105 | EXPORT_SYMBOL(uml_physmem); | ||
106 | |||
105 | unsigned long uml_reserved; /* Also modified in mem_init */ | 107 | unsigned long uml_reserved; /* Also modified in mem_init */ |
106 | unsigned long start_vm; | 108 | unsigned long start_vm; |
107 | unsigned long end_vm; | 109 | unsigned long end_vm; |