Commit 73395a0002aa9573ffc8d989587b79663847f705

Authored by Al Viro
Committed by Richard Weinberger
1 parent a34978cbd9

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>

Showing 10 changed files with 40 additions and 54 deletions Side-by-side Diff

arch/um/kernel/exec.c
... ... @@ -3,14 +3,15 @@
3 3 * Licensed under the GPL
4 4 */
5 5  
6   -#include "linux/stddef.h"
7   -#include "linux/fs.h"
8   -#include "linux/ptrace.h"
9   -#include "linux/sched.h"
10   -#include "linux/slab.h"
11   -#include "asm/current.h"
12   -#include "asm/processor.h"
13   -#include "asm/uaccess.h"
  6 +#include <linux/stddef.h>
  7 +#include <linux/module.h>
  8 +#include <linux/fs.h>
  9 +#include <linux/ptrace.h>
  10 +#include <linux/sched.h>
  11 +#include <linux/slab.h>
  12 +#include <asm/current.h>
  13 +#include <asm/processor.h>
  14 +#include <asm/uaccess.h>
14 15 #include "as-layout.h"
15 16 #include "mem_user.h"
16 17 #include "skas.h"
... ... @@ -41,6 +42,7 @@
41 42 PT_REGS_IP(regs) = eip;
42 43 PT_REGS_SP(regs) = esp;
43 44 }
  45 +EXPORT_SYMBOL(start_thread);
44 46  
45 47 static long execve1(const char *file,
46 48 const char __user *const __user *argv,
arch/um/kernel/irq.c
... ... @@ -258,6 +258,7 @@
258 258  
259 259 ignore_sigio_fd(fd);
260 260 }
  261 +EXPORT_SYMBOL(deactivate_fd);
261 262  
262 263 /*
263 264 * Called just before shutdown in order to provide a clean exec
arch/um/kernel/ksyms.c
... ... @@ -3,34 +3,12 @@
3 3 * Licensed under the GPL
4 4 */
5 5  
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"
  6 +#include <linux/module.h>
13 7 #include "os.h"
14 8  
15   -EXPORT_SYMBOL(uml_physmem);
16 9 EXPORT_SYMBOL(set_signals);
17 10 EXPORT_SYMBOL(get_signals);
18   -EXPORT_SYMBOL(kernel_thread);
19   -EXPORT_SYMBOL(sys_waitpid);
20   -EXPORT_SYMBOL(flush_tlb_range);
21 11  
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   -
34 12 EXPORT_SYMBOL(os_stat_fd);
35 13 EXPORT_SYMBOL(os_stat_file);
36 14 EXPORT_SYMBOL(os_access);
37 15  
38 16  
... ... @@ -57,25 +35,11 @@
57 35 EXPORT_SYMBOL(os_accept_connection);
58 36 EXPORT_SYMBOL(os_rcv_fd);
59 37 EXPORT_SYMBOL(run_helper);
60   -EXPORT_SYMBOL(start_thread);
61 38 EXPORT_SYMBOL(os_major);
62 39 EXPORT_SYMBOL(os_minor);
63 40 EXPORT_SYMBOL(os_makedev);
64 41  
65 42 EXPORT_SYMBOL(add_sigio_fd);
66 43 EXPORT_SYMBOL(ignore_sigio_fd);
67   -EXPORT_SYMBOL(deactivate_fd);
68 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
arch/um/kernel/mem.c
... ... @@ -4,6 +4,7 @@
4 4 */
5 5  
6 6 #include <linux/stddef.h>
  7 +#include <linux/module.h>
7 8 #include <linux/bootmem.h>
8 9 #include <linux/highmem.h>
9 10 #include <linux/mm.h>
... ... @@ -20,6 +21,7 @@
20 21  
21 22 /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
22 23 unsigned long *empty_zero_page = NULL;
  24 +EXPORT_SYMBOL(empty_zero_page);
23 25 /* allocated in paging_init and unchanged thereafter */
24 26 static unsigned long *empty_bad_page = NULL;
25 27  
arch/um/kernel/physmem.c
... ... @@ -3,20 +3,22 @@
3 3 * Licensed under the GPL
4 4 */
5 5  
6   -#include "linux/bootmem.h"
7   -#include "linux/mm.h"
8   -#include "linux/pfn.h"
9   -#include "asm/page.h"
10   -#include "as-layout.h"
11   -#include "init.h"
12   -#include "kern.h"
13   -#include "mem_user.h"
14   -#include "os.h"
  6 +#include <linux/module.h>
  7 +#include <linux/bootmem.h>
  8 +#include <linux/mm.h>
  9 +#include <linux/pfn.h>
  10 +#include <asm/page.h>
  11 +#include <as-layout.h>
  12 +#include <init.h>
  13 +#include <kern.h>
  14 +#include <mem_user.h>
  15 +#include <os.h>
15 16  
16 17 static int physmem_fd = -1;
17 18  
18 19 /* Changed during early boot */
19 20 unsigned long high_physmem;
  21 +EXPORT_SYMBOL(high_physmem);
20 22  
21 23 extern unsigned long long physmem_size;
22 24  
... ... @@ -184,6 +186,7 @@
184 186  
185 187 return 0;
186 188 }
  189 +EXPORT_SYMBOL(find_iomem);
187 190  
188 191 static int setup_iomem(void)
189 192 {
arch/um/kernel/process.c
... ... @@ -78,6 +78,7 @@
78 78 &current->thread.regs, 0, NULL, NULL);
79 79 return pid;
80 80 }
  81 +EXPORT_SYMBOL(kernel_thread);
81 82  
82 83 static inline void set_current(struct task_struct *task)
83 84 {
... ... @@ -286,6 +287,7 @@
286 287 {
287 288 return kstrdup(string, GFP_KERNEL);
288 289 }
  290 +EXPORT_SYMBOL(uml_strdup);
289 291  
290 292 int copy_to_user_proc(void __user *to, void *from, int size)
291 293 {
arch/um/kernel/skas/uaccess.c
... ... @@ -6,6 +6,7 @@
6 6 #include <linux/err.h>
7 7 #include <linux/highmem.h>
8 8 #include <linux/mm.h>
  9 +#include <linux/module.h>
9 10 #include <linux/sched.h>
10 11 #include <asm/current.h>
11 12 #include <asm/page.h>
... ... @@ -149,6 +150,7 @@
149 150 buffer_op((unsigned long) from, n, 0, copy_chunk_from_user, &to):
150 151 n;
151 152 }
  153 +EXPORT_SYMBOL(copy_from_user);
152 154  
153 155 static int copy_chunk_to_user(unsigned long to, int len, void *arg)
154 156 {
... ... @@ -170,6 +172,7 @@
170 172 buffer_op((unsigned long) to, n, 1, copy_chunk_to_user, &from) :
171 173 n;
172 174 }
  175 +EXPORT_SYMBOL(copy_to_user);
173 176  
174 177 static int strncpy_chunk_from_user(unsigned long from, int len, void *arg)
175 178 {
... ... @@ -204,6 +207,7 @@
204 207 return -EFAULT;
205 208 return strnlen(dst, count);
206 209 }
  210 +EXPORT_SYMBOL(strncpy_from_user);
207 211  
208 212 static int clear_chunk(unsigned long addr, int len, void *unused)
209 213 {
... ... @@ -226,6 +230,7 @@
226 230 return access_ok(VERIFY_WRITE, mem, len) ?
227 231 buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL) : len;
228 232 }
  233 +EXPORT_SYMBOL(clear_user);
229 234  
230 235 static int strnlen_chunk(unsigned long str, int len, void *arg)
231 236 {
... ... @@ -251,4 +256,5 @@
251 256 return count + 1;
252 257 return -EFAULT;
253 258 }
  259 +EXPORT_SYMBOL(strnlen_user);
arch/um/kernel/tlb.c
... ... @@ -4,6 +4,7 @@
4 4 */
5 5  
6 6 #include <linux/mm.h>
  7 +#include <linux/module.h>
7 8 #include <linux/sched.h>
8 9 #include <asm/pgtable.h>
9 10 #include <asm/tlbflush.h>
... ... @@ -498,6 +499,7 @@
498 499 flush_tlb_kernel_range_common(start, end);
499 500 else fix_range(vma->vm_mm, start, end, 0);
500 501 }
  502 +EXPORT_SYMBOL(flush_tlb_range);
501 503  
502 504 void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
503 505 unsigned long end)
arch/um/kernel/trap.c
... ... @@ -6,6 +6,7 @@
6 6 #include <linux/mm.h>
7 7 #include <linux/sched.h>
8 8 #include <linux/hardirq.h>
  9 +#include <linux/module.h>
9 10 #include <asm/current.h>
10 11 #include <asm/pgtable.h>
11 12 #include <asm/tlbflush.h>
... ... @@ -111,6 +112,7 @@
111 112 pagefault_out_of_memory();
112 113 return 0;
113 114 }
  115 +EXPORT_SYMBOL(handle_page_fault);
114 116  
115 117 static void show_segv_info(struct uml_pt_regs *regs)
116 118 {
arch/um/kernel/um_arch.c
... ... @@ -102,6 +102,8 @@
102 102  
103 103 /* Set in linux_main */
104 104 unsigned long uml_physmem;
  105 +EXPORT_SYMBOL(uml_physmem);
  106 +
105 107 unsigned long uml_reserved; /* Also modified in mem_init */
106 108 unsigned long start_vm;
107 109 unsigned long end_vm;