aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/include/sysdep-i386/syscalls.h99
-rw-r--r--arch/um/include/sysdep-x86_64/syscalls.h11
-rw-r--r--arch/um/kernel/Makefile2
-rw-r--r--arch/um/sys-i386/Makefile3
-rw-r--r--arch/um/sys-i386/sys_call_table.S16
-rw-r--r--arch/um/sys-x86_64/Makefile2
-rw-r--r--arch/um/sys-x86_64/sys_call_table.c (renamed from arch/um/kernel/sys_call_table.c)12
7 files changed, 29 insertions, 116 deletions
diff --git a/arch/um/include/sysdep-i386/syscalls.h b/arch/um/include/sysdep-i386/syscalls.h
index 5db81ec9087d..be0a3e3469eb 100644
--- a/arch/um/include/sysdep-i386/syscalls.h
+++ b/arch/um/include/sysdep-i386/syscalls.h
@@ -22,102 +22,3 @@ extern syscall_handler_t old_mmap_i386;
22extern long sys_mmap2(unsigned long addr, unsigned long len, 22extern long sys_mmap2(unsigned long addr, unsigned long len,
23 unsigned long prot, unsigned long flags, 23 unsigned long prot, unsigned long flags,
24 unsigned long fd, unsigned long pgoff); 24 unsigned long fd, unsigned long pgoff);
25
26/* On i386 they choose a meaningless naming.*/
27#define __NR_kexec_load __NR_sys_kexec_load
28
29#define ARCH_SYSCALLS \
30 [ __NR_waitpid ] = (syscall_handler_t *) sys_waitpid, \
31 [ __NR_break ] = (syscall_handler_t *) sys_ni_syscall, \
32 [ __NR_oldstat ] = (syscall_handler_t *) sys_stat, \
33 [ __NR_umount ] = (syscall_handler_t *) sys_oldumount, \
34 [ __NR_stime ] = um_stime, \
35 [ __NR_oldfstat ] = (syscall_handler_t *) sys_fstat, \
36 [ __NR_stty ] = (syscall_handler_t *) sys_ni_syscall, \
37 [ __NR_gtty ] = (syscall_handler_t *) sys_ni_syscall, \
38 [ __NR_nice ] = (syscall_handler_t *) sys_nice, \
39 [ __NR_ftime ] = (syscall_handler_t *) sys_ni_syscall, \
40 [ __NR_prof ] = (syscall_handler_t *) sys_ni_syscall, \
41 [ __NR_signal ] = (syscall_handler_t *) sys_signal, \
42 [ __NR_lock ] = (syscall_handler_t *) sys_ni_syscall, \
43 [ __NR_mpx ] = (syscall_handler_t *) sys_ni_syscall, \
44 [ __NR_ulimit ] = (syscall_handler_t *) sys_ni_syscall, \
45 [ __NR_oldolduname ] = (syscall_handler_t *) sys_olduname, \
46 [ __NR_sigaction ] = (syscall_handler_t *) sys_sigaction, \
47 [ __NR_sgetmask ] = (syscall_handler_t *) sys_sgetmask, \
48 [ __NR_ssetmask ] = (syscall_handler_t *) sys_ssetmask, \
49 [ __NR_sigsuspend ] = (syscall_handler_t *) sys_sigsuspend, \
50 [ __NR_sigpending ] = (syscall_handler_t *) sys_sigpending, \
51 [ __NR_oldlstat ] = (syscall_handler_t *) sys_lstat, \
52 [ __NR_readdir ] = old_readdir, \
53 [ __NR_profil ] = (syscall_handler_t *) sys_ni_syscall, \
54 [ __NR_socketcall ] = (syscall_handler_t *) sys_socketcall, \
55 [ __NR_olduname ] = (syscall_handler_t *) sys_uname, \
56 [ __NR_iopl ] = (syscall_handler_t *) sys_ni_syscall, \
57 [ __NR_idle ] = (syscall_handler_t *) sys_ni_syscall, \
58 [ __NR_ipc ] = (syscall_handler_t *) sys_ipc, \
59 [ __NR_sigreturn ] = (syscall_handler_t *) sys_sigreturn, \
60 [ __NR_sigprocmask ] = (syscall_handler_t *) sys_sigprocmask, \
61 [ __NR_bdflush ] = (syscall_handler_t *) sys_bdflush, \
62 [ __NR__llseek ] = (syscall_handler_t *) sys_llseek, \
63 [ __NR__newselect ] = (syscall_handler_t *) sys_select, \
64 [ __NR_vm86 ] = (syscall_handler_t *) sys_ni_syscall, \
65 [ __NR_mmap ] = (syscall_handler_t *) old_mmap_i386, \
66 [ __NR_ugetrlimit ] = (syscall_handler_t *) sys_getrlimit, \
67 [ __NR_mmap2 ] = (syscall_handler_t *) sys_mmap2, \
68 [ __NR_truncate64 ] = (syscall_handler_t *) sys_truncate64, \
69 [ __NR_ftruncate64 ] = (syscall_handler_t *) sys_ftruncate64, \
70 [ __NR_stat64 ] = (syscall_handler_t *) sys_stat64, \
71 [ __NR_lstat64 ] = (syscall_handler_t *) sys_lstat64, \
72 [ __NR_fstat64 ] = (syscall_handler_t *) sys_fstat64, \
73 [ __NR_fcntl64 ] = (syscall_handler_t *) sys_fcntl64, \
74 [ __NR_sendfile64 ] = (syscall_handler_t *) sys_sendfile64, \
75 [ __NR_statfs64 ] = (syscall_handler_t *) sys_statfs64, \
76 [ __NR_fstatfs64 ] = (syscall_handler_t *) sys_fstatfs64, \
77 [ __NR_fadvise64_64 ] = (syscall_handler_t *) sys_fadvise64_64, \
78 [ __NR_select ] = (syscall_handler_t *) old_select, \
79 [ __NR_vm86old ] = (syscall_handler_t *) sys_ni_syscall, \
80 [ __NR_modify_ldt ] = (syscall_handler_t *) sys_modify_ldt, \
81 [ __NR_lchown32 ] = (syscall_handler_t *) sys_lchown, \
82 [ __NR_getuid32 ] = (syscall_handler_t *) sys_getuid, \
83 [ __NR_getgid32 ] = (syscall_handler_t *) sys_getgid, \
84 [ __NR_geteuid32 ] = (syscall_handler_t *) sys_geteuid, \
85 [ __NR_getegid32 ] = (syscall_handler_t *) sys_getegid, \
86 [ __NR_setreuid32 ] = (syscall_handler_t *) sys_setreuid, \
87 [ __NR_setregid32 ] = (syscall_handler_t *) sys_setregid, \
88 [ __NR_getgroups32 ] = (syscall_handler_t *) sys_getgroups, \
89 [ __NR_setgroups32 ] = (syscall_handler_t *) sys_setgroups, \
90 [ __NR_fchown32 ] = (syscall_handler_t *) sys_fchown, \
91 [ __NR_setresuid32 ] = (syscall_handler_t *) sys_setresuid, \
92 [ __NR_getresuid32 ] = (syscall_handler_t *) sys_getresuid, \
93 [ __NR_setresgid32 ] = (syscall_handler_t *) sys_setresgid, \
94 [ __NR_getresgid32 ] = (syscall_handler_t *) sys_getresgid, \
95 [ __NR_chown32 ] = (syscall_handler_t *) sys_chown, \
96 [ __NR_setuid32 ] = (syscall_handler_t *) sys_setuid, \
97 [ __NR_setgid32 ] = (syscall_handler_t *) sys_setgid, \
98 [ __NR_setfsuid32 ] = (syscall_handler_t *) sys_setfsuid, \
99 [ __NR_setfsgid32 ] = (syscall_handler_t *) sys_setfsgid, \
100 [ __NR_pivot_root ] = (syscall_handler_t *) sys_pivot_root, \
101 [ __NR_mincore ] = (syscall_handler_t *) sys_mincore, \
102 [ __NR_madvise ] = (syscall_handler_t *) sys_madvise, \
103 [ 222 ] = (syscall_handler_t *) sys_ni_syscall, \
104 [ 223 ] = (syscall_handler_t *) sys_ni_syscall, \
105 [ __NR_set_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
106 [ __NR_get_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
107 [ 251 ] = (syscall_handler_t *) sys_ni_syscall, \
108 [ 285 ] = (syscall_handler_t *) sys_ni_syscall,
109
110/* 222 doesn't yet have a name in include/asm-i386/unistd.h */
111
112#define LAST_ARCH_SYSCALL 285
113
114/*
115 * Overrides for Emacs so that we follow Linus's tabbing style.
116 * Emacs will notice this stuff at the end of the file and automatically
117 * adjust the settings for this buffer only. This must remain at the end
118 * of the file.
119 * ---------------------------------------------------------------------------
120 * Local variables:
121 * c-file-style: "linux"
122 * End:
123 */
diff --git a/arch/um/include/sysdep-x86_64/syscalls.h b/arch/um/include/sysdep-x86_64/syscalls.h
index b187a4157ff3..65a01e3d8707 100644
--- a/arch/um/include/sysdep-x86_64/syscalls.h
+++ b/arch/um/include/sysdep-x86_64/syscalls.h
@@ -78,14 +78,3 @@ extern syscall_handler_t sys_arch_prctl;
78#define NR_syscalls 1024 78#define NR_syscalls 1024
79 79
80#endif 80#endif
81
82/*
83 * Overrides for Emacs so that we follow Linus's tabbing style.
84 * Emacs will notice this stuff at the end of the file and automatically
85 * adjust the settings for this buffer only. This must remain at the end
86 * of the file.
87 * ---------------------------------------------------------------------------
88 * Local variables:
89 * c-file-style: "linux"
90 * End:
91 */
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 280d3000111b..246f0e7fb4cc 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -10,7 +10,7 @@ obj-y = checksum.o config.o exec_kern.o exitcode.o \
10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ 10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \
11 physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ 11 physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \
12 sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \ 12 sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \
13 syscall_kern.o sysrq.o sys_call_table.o tempfile.o time.o time_kern.o \ 13 syscall_kern.o sysrq.o tempfile.o time.o time_kern.o \
14 tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o umid.o \ 14 tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o umid.o \
15 user_util.o 15 user_util.o
16 16
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
index 71b47e618605..950781e354de 100644
--- a/arch/um/sys-i386/Makefile
+++ b/arch/um/sys-i386/Makefile
@@ -1,5 +1,6 @@
1obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ 1obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
2 ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o 2 ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o \
3 sys_call_table.o
3 4
4obj-$(CONFIG_HIGHMEM) += highmem.o 5obj-$(CONFIG_HIGHMEM) += highmem.o
5obj-$(CONFIG_MODULES) += module.o 6obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/um/sys-i386/sys_call_table.S b/arch/um/sys-i386/sys_call_table.S
new file mode 100644
index 000000000000..ad75c27afe38
--- /dev/null
+++ b/arch/um/sys-i386/sys_call_table.S
@@ -0,0 +1,16 @@
1#include <linux/linkage.h>
2/* Steal i386 syscall table for our purposes, but with some slight changes.*/
3
4#define sys_iopl sys_ni_syscall
5#define sys_ioperm sys_ni_syscall
6
7#define sys_vm86old sys_ni_syscall
8#define sys_vm86 sys_ni_syscall
9#define sys_set_thread_area sys_ni_syscall
10#define sys_get_thread_area sys_ni_syscall
11
12#define sys_stime um_stime
13#define sys_time um_time
14#define old_mmap old_mmap_i386
15
16#include "../../i386/kernel/syscall_table.S"
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile
index 2129e3143559..274158e7da3f 100644
--- a/arch/um/sys-x86_64/Makefile
+++ b/arch/um/sys-x86_64/Makefile
@@ -6,7 +6,7 @@
6 6
7lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o mem.o memcpy.o \ 7lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o mem.o memcpy.o \
8 ptrace.o ptrace_user.o semaphore.o sigcontext.o signal.o \ 8 ptrace.o ptrace_user.o semaphore.o sigcontext.o signal.o \
9 syscalls.o sysrq.o thunk.o 9 syscalls.o sysrq.o thunk.o sys_call_table.o
10 10
11USER_OBJS := ptrace_user.o sigcontext.o 11USER_OBJS := ptrace_user.o sigcontext.o
12 12
diff --git a/arch/um/kernel/sys_call_table.c b/arch/um/sys-x86_64/sys_call_table.c
index b671a31a0069..3f5efbfb46de 100644
--- a/arch/um/kernel/sys_call_table.c
+++ b/arch/um/sys-x86_64/sys_call_table.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
3 * Copyright 2003 PathScale, Inc. 3 * Copyright 2003 PathScale, Inc.
4 * Licensed under the GPL 4 * Licensed under the GPL
@@ -14,6 +14,12 @@
14#include "sysdep/syscalls.h" 14#include "sysdep/syscalls.h"
15#include "kern_util.h" 15#include "kern_util.h"
16 16
17#ifdef CONFIG_NFSD
18#define NFSSERVCTL sys_nfsservctl
19#else
20#define NFSSERVCTL sys_ni_syscall
21#endif
22
17#define LAST_GENERIC_SYSCALL __NR_keyctl 23#define LAST_GENERIC_SYSCALL __NR_keyctl
18 24
19#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL 25#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL
@@ -183,7 +189,7 @@ syscall_handler_t *sys_call_table[] = {
183 [ __NR_getresuid ] = (syscall_handler_t *) sys_getresuid16, 189 [ __NR_getresuid ] = (syscall_handler_t *) sys_getresuid16,
184 [ __NR_query_module ] = (syscall_handler_t *) sys_ni_syscall, 190 [ __NR_query_module ] = (syscall_handler_t *) sys_ni_syscall,
185 [ __NR_poll ] = (syscall_handler_t *) sys_poll, 191 [ __NR_poll ] = (syscall_handler_t *) sys_poll,
186 [ __NR_nfsservctl ] = (syscall_handler_t *) sys_nfsservctl, 192 [ __NR_nfsservctl ] = (syscall_handler_t *) NFSSERVCTL,
187 [ __NR_setresgid ] = (syscall_handler_t *) sys_setresgid16, 193 [ __NR_setresgid ] = (syscall_handler_t *) sys_setresgid16,
188 [ __NR_getresgid ] = (syscall_handler_t *) sys_getresgid16, 194 [ __NR_getresgid ] = (syscall_handler_t *) sys_getresgid16,
189 [ __NR_prctl ] = (syscall_handler_t *) sys_prctl, 195 [ __NR_prctl ] = (syscall_handler_t *) sys_prctl,
@@ -265,6 +271,6 @@ syscall_handler_t *sys_call_table[] = {
265 [ __NR_keyctl ] = (syscall_handler_t *) sys_keyctl, 271 [ __NR_keyctl ] = (syscall_handler_t *) sys_keyctl,
266 272
267 ARCH_SYSCALLS 273 ARCH_SYSCALLS
268 [ LAST_SYSCALL + 1 ... NR_syscalls ] = 274 [ LAST_SYSCALL + 1 ... NR_syscalls ] =
269 (syscall_handler_t *) sys_ni_syscall 275 (syscall_handler_t *) sys_ni_syscall
270}; 276};