aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 15:14:10 -0400
committerRichard Weinberger <richard@nod.at>2011-11-02 09:15:36 -0400
commit73395a0002aa9573ffc8d989587b79663847f705 (patch)
tree5edb92458670b6ae30c53c47179b60379922c729 /arch
parenta34978cbd977ab62c744f63daacd9dc1474482be (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.c18
-rw-r--r--arch/um/kernel/irq.c1
-rw-r--r--arch/um/kernel/ksyms.c38
-rw-r--r--arch/um/kernel/mem.c2
-rw-r--r--arch/um/kernel/physmem.c21
-rw-r--r--arch/um/kernel/process.c2
-rw-r--r--arch/um/kernel/skas/uaccess.c6
-rw-r--r--arch/um/kernel/tlb.c2
-rw-r--r--arch/um/kernel/trap.c2
-rw-r--r--arch/um/kernel/um_arch.c2
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}
45EXPORT_SYMBOL(start_thread);
44 46
45static long execve1(const char *file, 47static 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}
261EXPORT_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
15EXPORT_SYMBOL(uml_physmem);
16EXPORT_SYMBOL(set_signals); 9EXPORT_SYMBOL(set_signals);
17EXPORT_SYMBOL(get_signals); 10EXPORT_SYMBOL(get_signals);
18EXPORT_SYMBOL(kernel_thread);
19EXPORT_SYMBOL(sys_waitpid);
20EXPORT_SYMBOL(flush_tlb_range);
21
22EXPORT_SYMBOL(high_physmem);
23EXPORT_SYMBOL(empty_zero_page);
24EXPORT_SYMBOL(handle_page_fault);
25EXPORT_SYMBOL(find_iomem);
26
27EXPORT_SYMBOL(strnlen_user);
28EXPORT_SYMBOL(strncpy_from_user);
29EXPORT_SYMBOL(copy_to_user);
30EXPORT_SYMBOL(copy_from_user);
31EXPORT_SYMBOL(clear_user);
32EXPORT_SYMBOL(uml_strdup);
33 11
34EXPORT_SYMBOL(os_stat_fd); 12EXPORT_SYMBOL(os_stat_fd);
35EXPORT_SYMBOL(os_stat_file); 13EXPORT_SYMBOL(os_stat_file);
@@ -57,24 +35,10 @@ EXPORT_SYMBOL(os_connect_socket);
57EXPORT_SYMBOL(os_accept_connection); 35EXPORT_SYMBOL(os_accept_connection);
58EXPORT_SYMBOL(os_rcv_fd); 36EXPORT_SYMBOL(os_rcv_fd);
59EXPORT_SYMBOL(run_helper); 37EXPORT_SYMBOL(run_helper);
60EXPORT_SYMBOL(start_thread);
61EXPORT_SYMBOL(os_major); 38EXPORT_SYMBOL(os_major);
62EXPORT_SYMBOL(os_minor); 39EXPORT_SYMBOL(os_minor);
63EXPORT_SYMBOL(os_makedev); 40EXPORT_SYMBOL(os_makedev);
64 41
65EXPORT_SYMBOL(add_sigio_fd); 42EXPORT_SYMBOL(add_sigio_fd);
66EXPORT_SYMBOL(ignore_sigio_fd); 43EXPORT_SYMBOL(ignore_sigio_fd);
67EXPORT_SYMBOL(deactivate_fd);
68EXPORT_SYMBOL(sigio_broken); 44EXPORT_SYMBOL(sigio_broken);
69
70#ifdef CONFIG_SMP
71
72/* required for SMP */
73
74extern void __write_lock_failed(rwlock_t *rw);
75EXPORT_SYMBOL(__write_lock_failed);
76
77extern void __read_lock_failed(rwlock_t *rw);
78EXPORT_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 */
22unsigned long *empty_zero_page = NULL; 23unsigned long *empty_zero_page = NULL;
24EXPORT_SYMBOL(empty_zero_page);
23/* allocated in paging_init and unchanged thereafter */ 25/* allocated in paging_init and unchanged thereafter */
24static unsigned long *empty_bad_page = NULL; 26static 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
16static int physmem_fd = -1; 17static int physmem_fd = -1;
17 18
18/* Changed during early boot */ 19/* Changed during early boot */
19unsigned long high_physmem; 20unsigned long high_physmem;
21EXPORT_SYMBOL(high_physmem);
20 22
21extern unsigned long long physmem_size; 23extern 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}
189EXPORT_SYMBOL(find_iomem);
187 190
188static int setup_iomem(void) 191static 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 &current->thread.regs, 0, NULL, NULL); 78 &current->thread.regs, 0, NULL, NULL);
79 return pid; 79 return pid;
80} 80}
81EXPORT_SYMBOL(kernel_thread);
81 82
82static inline void set_current(struct task_struct *task) 83static 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}
290EXPORT_SYMBOL(uml_strdup);
289 291
290int copy_to_user_proc(void __user *to, void *from, int size) 292int 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}
153EXPORT_SYMBOL(copy_from_user);
152 154
153static int copy_chunk_to_user(unsigned long to, int len, void *arg) 155static 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}
175EXPORT_SYMBOL(copy_to_user);
173 176
174static int strncpy_chunk_from_user(unsigned long from, int len, void *arg) 177static 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}
210EXPORT_SYMBOL(strncpy_from_user);
207 211
208static int clear_chunk(unsigned long addr, int len, void *unused) 212static 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}
233EXPORT_SYMBOL(clear_user);
229 234
230static int strnlen_chunk(unsigned long str, int len, void *arg) 235static 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}
259EXPORT_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}
502EXPORT_SYMBOL(flush_tlb_range);
501 503
502void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, 504void 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}
115EXPORT_SYMBOL(handle_page_fault);
114 116
115static void show_segv_info(struct uml_pt_regs *regs) 117static 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 */
104unsigned long uml_physmem; 104unsigned long uml_physmem;
105EXPORT_SYMBOL(uml_physmem);
106
105unsigned long uml_reserved; /* Also modified in mem_init */ 107unsigned long uml_reserved; /* Also modified in mem_init */
106unsigned long start_vm; 108unsigned long start_vm;
107unsigned long end_vm; 109unsigned long end_vm;