aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-01 11:58:55 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:55 -0400
commit5e7b83ffc67e15791d9bf8b2a18e4f5fd0eb69b8 (patch)
tree21d245a8ebe9a36748b1f76ff9050ceeaeba926c /arch
parente9c527163d31da9f616e989a90429729525c5233 (diff)
[PATCH] uml: fix syscall table by including $(SUBARCH)'s one, for i386
Split the i386 entry.S files into entry.S and syscall_table.S which is included in the previous one (so actually there is no difference between them) and use the syscall_table.S in the UML build, instead of tracking by hand the syscall table changes (which is inherently error-prone). We must only insert the right #defines to inject the changes we need from the i386 syscall table (for instance some different function names); also, we don't implement some i386 syscalls, as ioperm(), nor some TLS-related ones (yet to provide). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/entry.S292
-rw-r--r--arch/i386/kernel/syscall_table.S291
-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
9 files changed, 321 insertions, 407 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 25bf7589e0c4..a991d4e5edd2 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -652,296 +652,6 @@ ENTRY(spurious_interrupt_bug)
652 pushl $do_spurious_interrupt_bug 652 pushl $do_spurious_interrupt_bug
653 jmp error_code 653 jmp error_code
654 654
655.data 655#include "syscall_table.S"
656ENTRY(sys_call_table)
657 .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
658 .long sys_exit
659 .long sys_fork
660 .long sys_read
661 .long sys_write
662 .long sys_open /* 5 */
663 .long sys_close
664 .long sys_waitpid
665 .long sys_creat
666 .long sys_link
667 .long sys_unlink /* 10 */
668 .long sys_execve
669 .long sys_chdir
670 .long sys_time
671 .long sys_mknod
672 .long sys_chmod /* 15 */
673 .long sys_lchown16
674 .long sys_ni_syscall /* old break syscall holder */
675 .long sys_stat
676 .long sys_lseek
677 .long sys_getpid /* 20 */
678 .long sys_mount
679 .long sys_oldumount
680 .long sys_setuid16
681 .long sys_getuid16
682 .long sys_stime /* 25 */
683 .long sys_ptrace
684 .long sys_alarm
685 .long sys_fstat
686 .long sys_pause
687 .long sys_utime /* 30 */
688 .long sys_ni_syscall /* old stty syscall holder */
689 .long sys_ni_syscall /* old gtty syscall holder */
690 .long sys_access
691 .long sys_nice
692 .long sys_ni_syscall /* 35 - old ftime syscall holder */
693 .long sys_sync
694 .long sys_kill
695 .long sys_rename
696 .long sys_mkdir
697 .long sys_rmdir /* 40 */
698 .long sys_dup
699 .long sys_pipe
700 .long sys_times
701 .long sys_ni_syscall /* old prof syscall holder */
702 .long sys_brk /* 45 */
703 .long sys_setgid16
704 .long sys_getgid16
705 .long sys_signal
706 .long sys_geteuid16
707 .long sys_getegid16 /* 50 */
708 .long sys_acct
709 .long sys_umount /* recycled never used phys() */
710 .long sys_ni_syscall /* old lock syscall holder */
711 .long sys_ioctl
712 .long sys_fcntl /* 55 */
713 .long sys_ni_syscall /* old mpx syscall holder */
714 .long sys_setpgid
715 .long sys_ni_syscall /* old ulimit syscall holder */
716 .long sys_olduname
717 .long sys_umask /* 60 */
718 .long sys_chroot
719 .long sys_ustat
720 .long sys_dup2
721 .long sys_getppid
722 .long sys_getpgrp /* 65 */
723 .long sys_setsid
724 .long sys_sigaction
725 .long sys_sgetmask
726 .long sys_ssetmask
727 .long sys_setreuid16 /* 70 */
728 .long sys_setregid16
729 .long sys_sigsuspend
730 .long sys_sigpending
731 .long sys_sethostname
732 .long sys_setrlimit /* 75 */
733 .long sys_old_getrlimit
734 .long sys_getrusage
735 .long sys_gettimeofday
736 .long sys_settimeofday
737 .long sys_getgroups16 /* 80 */
738 .long sys_setgroups16
739 .long old_select
740 .long sys_symlink
741 .long sys_lstat
742 .long sys_readlink /* 85 */
743 .long sys_uselib
744 .long sys_swapon
745 .long sys_reboot
746 .long old_readdir
747 .long old_mmap /* 90 */
748 .long sys_munmap
749 .long sys_truncate
750 .long sys_ftruncate
751 .long sys_fchmod
752 .long sys_fchown16 /* 95 */
753 .long sys_getpriority
754 .long sys_setpriority
755 .long sys_ni_syscall /* old profil syscall holder */
756 .long sys_statfs
757 .long sys_fstatfs /* 100 */
758 .long sys_ioperm
759 .long sys_socketcall
760 .long sys_syslog
761 .long sys_setitimer
762 .long sys_getitimer /* 105 */
763 .long sys_newstat
764 .long sys_newlstat
765 .long sys_newfstat
766 .long sys_uname
767 .long sys_iopl /* 110 */
768 .long sys_vhangup
769 .long sys_ni_syscall /* old "idle" system call */
770 .long sys_vm86old
771 .long sys_wait4
772 .long sys_swapoff /* 115 */
773 .long sys_sysinfo
774 .long sys_ipc
775 .long sys_fsync
776 .long sys_sigreturn
777 .long sys_clone /* 120 */
778 .long sys_setdomainname
779 .long sys_newuname
780 .long sys_modify_ldt
781 .long sys_adjtimex
782 .long sys_mprotect /* 125 */
783 .long sys_sigprocmask
784 .long sys_ni_syscall /* old "create_module" */
785 .long sys_init_module
786 .long sys_delete_module
787 .long sys_ni_syscall /* 130: old "get_kernel_syms" */
788 .long sys_quotactl
789 .long sys_getpgid
790 .long sys_fchdir
791 .long sys_bdflush
792 .long sys_sysfs /* 135 */
793 .long sys_personality
794 .long sys_ni_syscall /* reserved for afs_syscall */
795 .long sys_setfsuid16
796 .long sys_setfsgid16
797 .long sys_llseek /* 140 */
798 .long sys_getdents
799 .long sys_select
800 .long sys_flock
801 .long sys_msync
802 .long sys_readv /* 145 */
803 .long sys_writev
804 .long sys_getsid
805 .long sys_fdatasync
806 .long sys_sysctl
807 .long sys_mlock /* 150 */
808 .long sys_munlock
809 .long sys_mlockall
810 .long sys_munlockall
811 .long sys_sched_setparam
812 .long sys_sched_getparam /* 155 */
813 .long sys_sched_setscheduler
814 .long sys_sched_getscheduler
815 .long sys_sched_yield
816 .long sys_sched_get_priority_max
817 .long sys_sched_get_priority_min /* 160 */
818 .long sys_sched_rr_get_interval
819 .long sys_nanosleep
820 .long sys_mremap
821 .long sys_setresuid16
822 .long sys_getresuid16 /* 165 */
823 .long sys_vm86
824 .long sys_ni_syscall /* Old sys_query_module */
825 .long sys_poll
826 .long sys_nfsservctl
827 .long sys_setresgid16 /* 170 */
828 .long sys_getresgid16
829 .long sys_prctl
830 .long sys_rt_sigreturn
831 .long sys_rt_sigaction
832 .long sys_rt_sigprocmask /* 175 */
833 .long sys_rt_sigpending
834 .long sys_rt_sigtimedwait
835 .long sys_rt_sigqueueinfo
836 .long sys_rt_sigsuspend
837 .long sys_pread64 /* 180 */
838 .long sys_pwrite64
839 .long sys_chown16
840 .long sys_getcwd
841 .long sys_capget
842 .long sys_capset /* 185 */
843 .long sys_sigaltstack
844 .long sys_sendfile
845 .long sys_ni_syscall /* reserved for streams1 */
846 .long sys_ni_syscall /* reserved for streams2 */
847 .long sys_vfork /* 190 */
848 .long sys_getrlimit
849 .long sys_mmap2
850 .long sys_truncate64
851 .long sys_ftruncate64
852 .long sys_stat64 /* 195 */
853 .long sys_lstat64
854 .long sys_fstat64
855 .long sys_lchown
856 .long sys_getuid
857 .long sys_getgid /* 200 */
858 .long sys_geteuid
859 .long sys_getegid
860 .long sys_setreuid
861 .long sys_setregid
862 .long sys_getgroups /* 205 */
863 .long sys_setgroups
864 .long sys_fchown
865 .long sys_setresuid
866 .long sys_getresuid
867 .long sys_setresgid /* 210 */
868 .long sys_getresgid
869 .long sys_chown
870 .long sys_setuid
871 .long sys_setgid
872 .long sys_setfsuid /* 215 */
873 .long sys_setfsgid
874 .long sys_pivot_root
875 .long sys_mincore
876 .long sys_madvise
877 .long sys_getdents64 /* 220 */
878 .long sys_fcntl64
879 .long sys_ni_syscall /* reserved for TUX */
880 .long sys_ni_syscall
881 .long sys_gettid
882 .long sys_readahead /* 225 */
883 .long sys_setxattr
884 .long sys_lsetxattr
885 .long sys_fsetxattr
886 .long sys_getxattr
887 .long sys_lgetxattr /* 230 */
888 .long sys_fgetxattr
889 .long sys_listxattr
890 .long sys_llistxattr
891 .long sys_flistxattr
892 .long sys_removexattr /* 235 */
893 .long sys_lremovexattr
894 .long sys_fremovexattr
895 .long sys_tkill
896 .long sys_sendfile64
897 .long sys_futex /* 240 */
898 .long sys_sched_setaffinity
899 .long sys_sched_getaffinity
900 .long sys_set_thread_area
901 .long sys_get_thread_area
902 .long sys_io_setup /* 245 */
903 .long sys_io_destroy
904 .long sys_io_getevents
905 .long sys_io_submit
906 .long sys_io_cancel
907 .long sys_fadvise64 /* 250 */
908 .long sys_ni_syscall
909 .long sys_exit_group
910 .long sys_lookup_dcookie
911 .long sys_epoll_create
912 .long sys_epoll_ctl /* 255 */
913 .long sys_epoll_wait
914 .long sys_remap_file_pages
915 .long sys_set_tid_address
916 .long sys_timer_create
917 .long sys_timer_settime /* 260 */
918 .long sys_timer_gettime
919 .long sys_timer_getoverrun
920 .long sys_timer_delete
921 .long sys_clock_settime
922 .long sys_clock_gettime /* 265 */
923 .long sys_clock_getres
924 .long sys_clock_nanosleep
925 .long sys_statfs64
926 .long sys_fstatfs64
927 .long sys_tgkill /* 270 */
928 .long sys_utimes
929 .long sys_fadvise64_64
930 .long sys_ni_syscall /* sys_vserver */
931 .long sys_mbind
932 .long sys_get_mempolicy
933 .long sys_set_mempolicy
934 .long sys_mq_open
935 .long sys_mq_unlink
936 .long sys_mq_timedsend
937 .long sys_mq_timedreceive /* 280 */
938 .long sys_mq_notify
939 .long sys_mq_getsetattr
940 .long sys_ni_syscall /* reserved for kexec */
941 .long sys_waitid
942 .long sys_ni_syscall /* 285 */ /* available */
943 .long sys_add_key
944 .long sys_request_key
945 .long sys_keyctl
946 656
947syscall_table_size=(.-sys_call_table) 657syscall_table_size=(.-sys_call_table)
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S
new file mode 100644
index 000000000000..6cd1ed311f02
--- /dev/null
+++ b/arch/i386/kernel/syscall_table.S
@@ -0,0 +1,291 @@
1.data
2ENTRY(sys_call_table)
3 .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
4 .long sys_exit
5 .long sys_fork
6 .long sys_read
7 .long sys_write
8 .long sys_open /* 5 */
9 .long sys_close
10 .long sys_waitpid
11 .long sys_creat
12 .long sys_link
13 .long sys_unlink /* 10 */
14 .long sys_execve
15 .long sys_chdir
16 .long sys_time
17 .long sys_mknod
18 .long sys_chmod /* 15 */
19 .long sys_lchown16
20 .long sys_ni_syscall /* old break syscall holder */
21 .long sys_stat
22 .long sys_lseek
23 .long sys_getpid /* 20 */
24 .long sys_mount
25 .long sys_oldumount
26 .long sys_setuid16
27 .long sys_getuid16
28 .long sys_stime /* 25 */
29 .long sys_ptrace
30 .long sys_alarm
31 .long sys_fstat
32 .long sys_pause
33 .long sys_utime /* 30 */
34 .long sys_ni_syscall /* old stty syscall holder */
35 .long sys_ni_syscall /* old gtty syscall holder */
36 .long sys_access
37 .long sys_nice
38 .long sys_ni_syscall /* 35 - old ftime syscall holder */
39 .long sys_sync
40 .long sys_kill
41 .long sys_rename
42 .long sys_mkdir
43 .long sys_rmdir /* 40 */
44 .long sys_dup
45 .long sys_pipe
46 .long sys_times
47 .long sys_ni_syscall /* old prof syscall holder */
48 .long sys_brk /* 45 */
49 .long sys_setgid16
50 .long sys_getgid16
51 .long sys_signal
52 .long sys_geteuid16
53 .long sys_getegid16 /* 50 */
54 .long sys_acct
55 .long sys_umount /* recycled never used phys() */
56 .long sys_ni_syscall /* old lock syscall holder */
57 .long sys_ioctl
58 .long sys_fcntl /* 55 */
59 .long sys_ni_syscall /* old mpx syscall holder */
60 .long sys_setpgid
61 .long sys_ni_syscall /* old ulimit syscall holder */
62 .long sys_olduname
63 .long sys_umask /* 60 */
64 .long sys_chroot
65 .long sys_ustat
66 .long sys_dup2
67 .long sys_getppid
68 .long sys_getpgrp /* 65 */
69 .long sys_setsid
70 .long sys_sigaction
71 .long sys_sgetmask
72 .long sys_ssetmask
73 .long sys_setreuid16 /* 70 */
74 .long sys_setregid16
75 .long sys_sigsuspend
76 .long sys_sigpending
77 .long sys_sethostname
78 .long sys_setrlimit /* 75 */
79 .long sys_old_getrlimit
80 .long sys_getrusage
81 .long sys_gettimeofday
82 .long sys_settimeofday
83 .long sys_getgroups16 /* 80 */
84 .long sys_setgroups16
85 .long old_select
86 .long sys_symlink
87 .long sys_lstat
88 .long sys_readlink /* 85 */
89 .long sys_uselib
90 .long sys_swapon
91 .long sys_reboot
92 .long old_readdir
93 .long old_mmap /* 90 */
94 .long sys_munmap
95 .long sys_truncate
96 .long sys_ftruncate
97 .long sys_fchmod
98 .long sys_fchown16 /* 95 */
99 .long sys_getpriority
100 .long sys_setpriority
101 .long sys_ni_syscall /* old profil syscall holder */
102 .long sys_statfs
103 .long sys_fstatfs /* 100 */
104 .long sys_ioperm
105 .long sys_socketcall
106 .long sys_syslog
107 .long sys_setitimer
108 .long sys_getitimer /* 105 */
109 .long sys_newstat
110 .long sys_newlstat
111 .long sys_newfstat
112 .long sys_uname
113 .long sys_iopl /* 110 */
114 .long sys_vhangup
115 .long sys_ni_syscall /* old "idle" system call */
116 .long sys_vm86old
117 .long sys_wait4
118 .long sys_swapoff /* 115 */
119 .long sys_sysinfo
120 .long sys_ipc
121 .long sys_fsync
122 .long sys_sigreturn
123 .long sys_clone /* 120 */
124 .long sys_setdomainname
125 .long sys_newuname
126 .long sys_modify_ldt
127 .long sys_adjtimex
128 .long sys_mprotect /* 125 */
129 .long sys_sigprocmask
130 .long sys_ni_syscall /* old "create_module" */
131 .long sys_init_module
132 .long sys_delete_module
133 .long sys_ni_syscall /* 130: old "get_kernel_syms" */
134 .long sys_quotactl
135 .long sys_getpgid
136 .long sys_fchdir
137 .long sys_bdflush
138 .long sys_sysfs /* 135 */
139 .long sys_personality
140 .long sys_ni_syscall /* reserved for afs_syscall */
141 .long sys_setfsuid16
142 .long sys_setfsgid16
143 .long sys_llseek /* 140 */
144 .long sys_getdents
145 .long sys_select
146 .long sys_flock
147 .long sys_msync
148 .long sys_readv /* 145 */
149 .long sys_writev
150 .long sys_getsid
151 .long sys_fdatasync
152 .long sys_sysctl
153 .long sys_mlock /* 150 */
154 .long sys_munlock
155 .long sys_mlockall
156 .long sys_munlockall
157 .long sys_sched_setparam
158 .long sys_sched_getparam /* 155 */
159 .long sys_sched_setscheduler
160 .long sys_sched_getscheduler
161 .long sys_sched_yield
162 .long sys_sched_get_priority_max
163 .long sys_sched_get_priority_min /* 160 */
164 .long sys_sched_rr_get_interval
165 .long sys_nanosleep
166 .long sys_mremap
167 .long sys_setresuid16
168 .long sys_getresuid16 /* 165 */
169 .long sys_vm86
170 .long sys_ni_syscall /* Old sys_query_module */
171 .long sys_poll
172 .long sys_nfsservctl
173 .long sys_setresgid16 /* 170 */
174 .long sys_getresgid16
175 .long sys_prctl
176 .long sys_rt_sigreturn
177 .long sys_rt_sigaction
178 .long sys_rt_sigprocmask /* 175 */
179 .long sys_rt_sigpending
180 .long sys_rt_sigtimedwait
181 .long sys_rt_sigqueueinfo
182 .long sys_rt_sigsuspend
183 .long sys_pread64 /* 180 */
184 .long sys_pwrite64
185 .long sys_chown16
186 .long sys_getcwd
187 .long sys_capget
188 .long sys_capset /* 185 */
189 .long sys_sigaltstack
190 .long sys_sendfile
191 .long sys_ni_syscall /* reserved for streams1 */
192 .long sys_ni_syscall /* reserved for streams2 */
193 .long sys_vfork /* 190 */
194 .long sys_getrlimit
195 .long sys_mmap2
196 .long sys_truncate64
197 .long sys_ftruncate64
198 .long sys_stat64 /* 195 */
199 .long sys_lstat64
200 .long sys_fstat64
201 .long sys_lchown
202 .long sys_getuid
203 .long sys_getgid /* 200 */
204 .long sys_geteuid
205 .long sys_getegid
206 .long sys_setreuid
207 .long sys_setregid
208 .long sys_getgroups /* 205 */
209 .long sys_setgroups
210 .long sys_fchown
211 .long sys_setresuid
212 .long sys_getresuid
213 .long sys_setresgid /* 210 */
214 .long sys_getresgid
215 .long sys_chown
216 .long sys_setuid
217 .long sys_setgid
218 .long sys_setfsuid /* 215 */
219 .long sys_setfsgid
220 .long sys_pivot_root
221 .long sys_mincore
222 .long sys_madvise
223 .long sys_getdents64 /* 220 */
224 .long sys_fcntl64
225 .long sys_ni_syscall /* reserved for TUX */
226 .long sys_ni_syscall
227 .long sys_gettid
228 .long sys_readahead /* 225 */
229 .long sys_setxattr
230 .long sys_lsetxattr
231 .long sys_fsetxattr
232 .long sys_getxattr
233 .long sys_lgetxattr /* 230 */
234 .long sys_fgetxattr
235 .long sys_listxattr
236 .long sys_llistxattr
237 .long sys_flistxattr
238 .long sys_removexattr /* 235 */
239 .long sys_lremovexattr
240 .long sys_fremovexattr
241 .long sys_tkill
242 .long sys_sendfile64
243 .long sys_futex /* 240 */
244 .long sys_sched_setaffinity
245 .long sys_sched_getaffinity
246 .long sys_set_thread_area
247 .long sys_get_thread_area
248 .long sys_io_setup /* 245 */
249 .long sys_io_destroy
250 .long sys_io_getevents
251 .long sys_io_submit
252 .long sys_io_cancel
253 .long sys_fadvise64 /* 250 */
254 .long sys_ni_syscall
255 .long sys_exit_group
256 .long sys_lookup_dcookie
257 .long sys_epoll_create
258 .long sys_epoll_ctl /* 255 */
259 .long sys_epoll_wait
260 .long sys_remap_file_pages
261 .long sys_set_tid_address
262 .long sys_timer_create
263 .long sys_timer_settime /* 260 */
264 .long sys_timer_gettime
265 .long sys_timer_getoverrun
266 .long sys_timer_delete
267 .long sys_clock_settime
268 .long sys_clock_gettime /* 265 */
269 .long sys_clock_getres
270 .long sys_clock_nanosleep
271 .long sys_statfs64
272 .long sys_fstatfs64
273 .long sys_tgkill /* 270 */
274 .long sys_utimes
275 .long sys_fadvise64_64
276 .long sys_ni_syscall /* sys_vserver */
277 .long sys_mbind
278 .long sys_get_mempolicy
279 .long sys_set_mempolicy
280 .long sys_mq_open
281 .long sys_mq_unlink
282 .long sys_mq_timedsend
283 .long sys_mq_timedreceive /* 280 */
284 .long sys_mq_notify
285 .long sys_mq_getsetattr
286 .long sys_ni_syscall /* reserved for kexec */
287 .long sys_waitid
288 .long sys_ni_syscall /* 285 */ /* available */
289 .long sys_add_key
290 .long sys_request_key
291 .long sys_keyctl
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};