aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/syscalls
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-11-11 18:55:49 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2011-11-17 16:35:36 -0500
commitd181764ccf6207e02abb95fb3052639b947f4833 (patch)
treecd37381b20d437d5d352a07b20fd4a01d332759b /arch/x86/syscalls
parentd5e553d6e0a4bdea43adae7373e3fa144b9a1aaa (diff)
x86: Machine-readable syscall tables and scripts to process them
Create a simple set of syscall tables and scripts to turn them into both header files (unistd_*.h) and macros for generating the system call tables. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/syscalls')
-rw-r--r--arch/x86/syscalls/Makefile43
-rw-r--r--arch/x86/syscalls/syscall_32.tbl357
-rw-r--r--arch/x86/syscalls/syscall_64.tbl320
-rw-r--r--arch/x86/syscalls/syscallhdr.sh36
-rw-r--r--arch/x86/syscalls/syscalltbl.sh15
5 files changed, 771 insertions, 0 deletions
diff --git a/arch/x86/syscalls/Makefile b/arch/x86/syscalls/Makefile
new file mode 100644
index 000000000000..564b2476fede
--- /dev/null
+++ b/arch/x86/syscalls/Makefile
@@ -0,0 +1,43 @@
1out := $(obj)/../include/generated/asm
2
3# Create output directory if not already present
4_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
5
6syscall32 := $(srctree)/$(src)/syscall_32.tbl
7syscall64 := $(srctree)/$(src)/syscall_64.tbl
8
9syshdr := $(srctree)/$(src)/syscallhdr.sh
10systbl := $(srctree)/$(src)/syscalltbl.sh
11
12quiet_cmd_syshdr = SYSHDR $@
13 cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' $< $@ \
14 $(syshdr_abi_$(basetarget)) $(syshdr_pfx_$(basetarget))
15quiet_cmd_systbl = SYSTBL $@
16 cmd_systbl = $(CONFIG_SHELL) '$(systbl)' $< $@
17
18syshdr_abi_unistd_32 := i386
19$(out)/unistd_32.h: $(syscall32) $(syshdr)
20 $(call if_changed,syshdr)
21
22syshdr_abi_unistd_32_ia32 := i386
23syshdr_pfx_unistd_32_ia32 := ia32_
24$(out)/unistd_32_ia32.h: $(syscall32) $(syshdr)
25 $(call if_changed,syshdr)
26
27syshdr_abi_unistd_64 := 64
28$(out)/unistd_64.h: $(syscall64) $(syshdr)
29 $(call if_changed,syshdr)
30
31$(out)/syscalls_32.h: $(syscall32) $(systbl)
32 $(call if_changed,systbl)
33$(out)/syscalls_64.h: $(syscall64) $(systbl)
34 $(call if_changed,systbl)
35
36syshdr-y += unistd_32.h unistd_64.h
37syshdr-y += syscalls_32.h
38syshdr-$(CONFIG_X86_64) += unistd_32_ia32.h
39syshdr-$(CONFIG_X86_64) += syscalls_64.h
40
41targets += $(syshdr-y)
42
43all: $(addprefix $(out)/,$(targets))
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl
new file mode 100644
index 000000000000..ce98e287c066
--- /dev/null
+++ b/arch/x86/syscalls/syscall_32.tbl
@@ -0,0 +1,357 @@
1#
2# 32-bit system call numbers and entry vectors
3#
4# The format is:
5# <number> <abi> <name> <entry point> <compat entry point>
6#
7# The abi is always "i386" for this file.
8#
90 i386 restart_syscall sys_restart_syscall
101 i386 exit sys_exit
112 i386 fork ptregs_fork stub32_fork
123 i386 read sys_read
134 i386 write sys_write
145 i386 open sys_open compat_sys_open
156 i386 close sys_close
167 i386 waitpid sys_waitpid sys32_waitpid
178 i386 creat sys_creat
189 i386 link sys_link
1910 i386 unlink sys_unlink
2011 i386 execve ptregs_execve stub32_execve
2112 i386 chdir sys_chdir
2213 i386 time sys_time compat_sys_time
2314 i386 mknod sys_mknod
2415 i386 chmod sys_chmod
2516 i386 lchown sys_lchown16
2617 i386 break
2718 i386 oldstat sys_stat
2819 i386 lseek sys_lseek sys32_lseek
2920 i386 getpid sys_getpid
3021 i386 mount sys_mount compat_sys_mount
3122 i386 umount sys_oldumount
3223 i386 setuid sys_setuid16
3324 i386 getuid sys_getuid16
3425 i386 stime sys_stime compat_sys_stime
3526 i386 ptrace sys_ptrace compat_sys_ptrace
3627 i386 alarm sys_alarm
3728 i386 oldfstat sys_fstat
3829 i386 pause sys_pause
3930 i386 utime sys_utime compat_sys_utime
4031 i386 stty
4132 i386 gtty
4233 i386 access sys_access
4334 i386 nice sys_nice
4435 i386 ftime
4536 i386 sync sys_sync
4637 i386 kill sys_kill sys32_kill
4738 i386 rename sys_rename
4839 i386 mkdir sys_mkdir
4940 i386 rmdir sys_rmdir
5041 i386 dup sys_dup
5142 i386 pipe sys_pipe
5243 i386 times sys_times compat_sys_times
5344 i386 prof
5445 i386 brk sys_brk
5546 i386 setgid sys_setgid16
5647 i386 getgid sys_getgid16
5748 i386 signal sys_signal
5849 i386 geteuid sys_geteuid16
5950 i386 getegid sys_getegid16
6051 i386 acct sys_acct
6152 i386 umount2 sys_umount
6253 i386 lock
6354 i386 ioctl sys_ioctl compat_sys_ioctl
6455 i386 fcntl sys_fcntl compat_sys_fcntl64
6556 i386 mpx
6657 i386 setpgid sys_setpgid
6758 i386 ulimit
6859 i386 oldolduname sys_olduname
6960 i386 umask sys_umask
7061 i386 chroot sys_chroot
7162 i386 ustat sys_ustat compat_sys_ustat
7263 i386 dup2 sys_dup2
7364 i386 getppid sys_getppid
7465 i386 getpgrp sys_getpgrp
7566 i386 setsid sys_setsid
7667 i386 sigaction sys_sigaction sys32_sigaction
7768 i386 sgetmask sys_sgetmask
7869 i386 ssetmask sys_ssetmask
7970 i386 setreuid sys_setreuid16
8071 i386 setregid sys_setregid16
8172 i386 sigsuspend sys_sigsuspend sys32_sigsuspend
8273 i386 sigpending sys_sigpending compat_sys_sigpending
8374 i386 sethostname sys_sethostname
8475 i386 setrlimit sys_setrlimit compat_sys_setrlimit
8576 i386 getrlimit sys_old_getrlimit compat_sys_old_getrlimit
8677 i386 getrusage sys_getrusage compat_sys_getrusage
8778 i386 gettimeofday sys_gettimeofday compat_sys_gettimeofday
8879 i386 settimeofday sys_settimeofday compat_sys_settimeofday
8980 i386 getgroups sys_getgroups16
9081 i386 setgroups sys_setgroups16
9182 i386 select sys_old_select compat_sys_old_select
9283 i386 symlink sys_symlink
9384 i386 oldlstat sys_lstat
9485 i386 readlink sys_readlink
9586 i386 uselib sys_uselib
9687 i386 swapon sys_swapon
9788 i386 reboot sys_reboot
9889 i386 readdir sys_old_readdir compat_sys_old_readdir
9990 i386 mmap sys_old_mmap sys32_mmap
10091 i386 munmap sys_munmap
10192 i386 truncate sys_truncate
10293 i386 ftruncate sys_ftruncate
10394 i386 fchmod sys_fchmod
10495 i386 fchown sys_fchown16
10596 i386 getpriority sys_getpriority
10697 i386 setpriority sys_setpriority
10798 i386 profil
10899 i386 statfs sys_statfs compat_sys_statfs
109100 i386 fstatfs sys_fstatfs compat_sys_fstatfs
110101 i386 ioperm sys_ioperm
111102 i386 socketcall sys_socketcall compat_sys_socketcall
112103 i386 syslog sys_syslog
113104 i386 setitimer sys_setitimer compat_sys_setitimer
114105 i386 getitimer sys_getitimer compat_sys_getitimer
115106 i386 stat sys_newstat compat_sys_newstat
116107 i386 lstat sys_newlstat compat_sys_newlstat
117108 i386 fstat sys_newfstat compat_sys_newfstat
118109 i386 olduname sys_uname
119110 i386 iopl ptregs_iopl stub32_iopl
120111 i386 vhangup sys_vhangup
121112 i386 idle
122113 i386 vm86old ptregs_vm86old sys32_vm86_warning
123114 i386 wait4 sys_wait4 compat_sys_wait4
124115 i386 swapoff sys_swapoff
125116 i386 sysinfo sys_sysinfo compat_sys_sysinfo
126117 i386 ipc sys_ipc sys32_ipc
127118 i386 fsync sys_fsync
128119 i386 sigreturn ptregs_sigreturn stub32_sigreturn
129120 i386 clone ptregs_clone stub32_clone
130121 i386 setdomainname sys_setdomainname
131122 i386 uname sys_newuname
132123 i386 modify_ldt sys_modify_ldt
133124 i386 adjtimex sys_adjtimex compat_sys_adjtimex
134125 i386 mprotect sys_mprotect sys32_mprotect
135126 i386 sigprocmask sys_sigprocmask compat_sys_sigprocmask
136127 i386 create_module
137128 i386 init_module sys_init_module
138129 i386 delete_module sys_delete_module
139130 i386 get_kernel_syms
140131 i386 quotactl sys_quotactl sys32_quotactl
141132 i386 getpgid sys_getpgid
142133 i386 fchdir sys_fchdir
143134 i386 bdflush sys_bdflush
144135 i386 sysfs sys_sysfs
145136 i386 personality sys_personality
146137 i386 afs_syscall
147138 i386 setfsuid sys_setfsuid16
148139 i386 setfsgid sys_setfsgid16
149140 i386 _llseek sys_llseek
150141 i386 getdents sys_getdents compat_sys_getdents
151142 i386 _newselect sys_select compat_sys_select
152143 i386 flock sys_flock
153144 i386 msync sys_msync
154145 i386 readv sys_readv compat_sys_readv
155146 i386 writev sys_writev compat_sys_writev
156147 i386 getsid sys_getsid
157148 i386 fdatasync sys_fdatasync
158149 i386 _sysctl sys_sysctl compat_sys_sysctl
159150 i386 mlock sys_mlock
160151 i386 munlock sys_munlock
161152 i386 mlockall sys_mlockall
162153 i386 munlockall sys_munlockall
163154 i386 sched_setparam sys_sched_setparam
164155 i386 sched_getparam sys_sched_getparam
165156 i386 sched_setscheduler sys_sched_setscheduler
166157 i386 sched_getscheduler sys_sched_getscheduler
167158 i386 sched_yield sys_sched_yield
168159 i386 sched_get_priority_max sys_sched_get_priority_max
169160 i386 sched_get_priority_min sys_sched_get_priority_min
170161 i386 sched_rr_get_interval sys_sched_rr_get_interval sys32_sched_rr_get_interval
171162 i386 nanosleep sys_nanosleep compat_sys_nanosleep
172163 i386 mremap sys_mremap
173164 i386 setresuid sys_setresuid16
174165 i386 getresuid sys_getresuid16
175166 i386 vm86 ptregs_vm86 sys32_vm86_warning
176167 i386 query_module
177168 i386 poll sys_poll
178169 i386 nfsservctl
179170 i386 setresgid sys_setresgid16
180171 i386 getresgid sys_getresgid16
181172 i386 prctl sys_prctl
182173 i386 rt_sigreturn ptregs_rt_sigreturn stub32_rt_sigreturn
183174 i386 rt_sigaction sys_rt_sigaction sys32_rt_sigaction
184175 i386 rt_sigprocmask sys_rt_sigprocmask sys32_rt_sigprocmask
185176 i386 rt_sigpending sys_rt_sigpending sys32_rt_sigpending
186177 i386 rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait
187178 i386 rt_sigqueueinfo sys_rt_sigqueueinfo sys32_rt_sigqueueinfo
188179 i386 rt_sigsuspend sys_rt_sigsuspend
189180 i386 pread64 sys_pread64 sys32_pread
190181 i386 pwrite64 sys_pwrite64 sys32_pwrite
191182 i386 chown sys_chown16
192183 i386 getcwd sys_getcwd
193184 i386 capget sys_capget
194185 i386 capset sys_capset
195186 i386 sigaltstack ptregs_sigaltstack stub32_sigaltstack
196187 i386 sendfile sys_sendfile sys32_sendfile
197188 i386 getpmsg
198189 i386 putpmsg
199190 i386 vfork ptregs_vfork stub32_vfork
200191 i386 ugetrlimit sys_getrlimit compat_sys_getrlimit
201192 i386 mmap2 sys_mmap_pgoff
202193 i386 truncate64 sys_truncate64 sys32_truncate64
203194 i386 ftruncate64 sys_ftruncate64 sys32_ftruncate64
204195 i386 stat64 sys_stat64 sys32_stat64
205196 i386 lstat64 sys_lstat64 sys32_lstat64
206197 i386 fstat64 sys_fstat64 sys32_fstat64
207198 i386 lchown32 sys_lchown
208199 i386 getuid32 sys_getuid
209200 i386 getgid32 sys_getgid
210201 i386 geteuid32 sys_geteuid
211202 i386 getegid32 sys_getegid
212203 i386 setreuid32 sys_setreuid
213204 i386 setregid32 sys_setregid
214205 i386 getgroups32 sys_getgroups
215206 i386 setgroups32 sys_setgroups
216207 i386 fchown32 sys_fchown
217208 i386 setresuid32 sys_setresuid
218209 i386 getresuid32 sys_getresuid
219210 i386 setresgid32 sys_setresgid
220211 i386 getresgid32 sys_getresgid
221212 i386 chown32 sys_chown
222213 i386 setuid32 sys_setuid
223214 i386 setgid32 sys_setgid
224215 i386 setfsuid32 sys_setfsuid
225216 i386 setfsgid32 sys_setfsgid
226217 i386 pivot_root sys_pivot_root
227218 i386 mincore sys_mincore
228219 i386 madvise sys_madvise
229220 i386 getdents64 sys_getdents64 compat_sys_getdents64
230221 i386 fcntl64 sys_fcntl64 compat_sys_fcntl64
231# 222 is unused
232# 223 is unused
233224 i386 gettid sys_gettid
234225 i386 readahead sys_readahead sys32_readahead
235226 i386 setxattr sys_setxattr
236227 i386 lsetxattr sys_lsetxattr
237228 i386 fsetxattr sys_fsetxattr
238229 i386 getxattr sys_getxattr
239230 i386 lgetxattr sys_lgetxattr
240231 i386 fgetxattr sys_fgetxattr
241232 i386 listxattr sys_listxattr
242233 i386 llistxattr sys_llistxattr
243234 i386 flistxattr sys_flistxattr
244235 i386 removexattr sys_removexattr
245236 i386 lremovexattr sys_lremovexattr
246237 i386 fremovexattr sys_fremovexattr
247238 i386 tkill sys_tkill
248239 i386 sendfile64 sys_sendfile64
249240 i386 futex sys_futex compat_sys_futex
250241 i386 sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity
251242 i386 sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity
252243 i386 set_thread_area sys_set_thread_area
253244 i386 get_thread_area sys_get_thread_area
254245 i386 io_setup sys_io_setup compat_sys_io_setup
255246 i386 io_destroy sys_io_destroy
256247 i386 io_getevents sys_io_getevents compat_sys_io_getevents
257248 i386 io_submit sys_io_submit compat_sys_io_submit
258249 i386 io_cancel sys_io_cancel
259250 i386 fadvise64 sys_fadvise64 sys32_fadvise64
260# 251 is available for reuse (was briefly sys_set_zone_reclaim)
261252 i386 exit_group sys_exit_group
262253 i386 lookup_dcookie sys_lookup_dcookie sys32_lookup_dcookie
263254 i386 epoll_create sys_epoll_create
264255 i386 epoll_ctl sys_epoll_ctl
265256 i386 epoll_wait sys_epoll_wait
266257 i386 remap_file_pages sys_remap_file_pages
267258 i386 set_tid_address sys_set_tid_address
268259 i386 timer_create sys_timer_create compat_sys_timer_create
269260 i386 timer_settime sys_timer_settime compat_sys_timer_settime
270261 i386 timer_gettime sys_timer_gettime compat_sys_timer_gettime
271262 i386 timer_getoverrun sys_timer_getoverrun
272263 i386 timer_delete sys_timer_delete
273264 i386 clock_settime sys_clock_settime compat_sys_clock_settime
274265 i386 clock_gettime sys_clock_gettime compat_sys_clock_gettime
275266 i386 clock_getres sys_clock_getres compat_sys_clock_getres
276267 i386 clock_nanosleep sys_clock_nanosleep compat_sys_clock_nanosleep
277268 i386 statfs64 sys_statfs64 compat_sys_statfs64
278269 i386 fstatfs64 sys_fstatfs64 compat_sys_fstatfs64
279270 i386 tgkill sys_tgkill
280271 i386 utimes sys_utimes compat_sys_utimes
281272 i386 fadvise64_64 sys_fadvise64_64 sys32_fadvise64_64
282273 i386 vserver
283274 i386 mbind sys_mbind
284275 i386 get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy
285276 i386 set_mempolicy sys_set_mempolicy
286277 i386 mq_open sys_mq_open compat_sys_mq_open
287278 i386 mq_unlink sys_mq_unlink
288279 i386 mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend
289280 i386 mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive
290281 i386 mq_notify sys_mq_notify compat_sys_mq_notify
291282 i386 mq_getsetaddr sys_mq_getsetattr compat_sys_mq_getsetattr
292283 i386 kexec_load sys_kexec_load compat_sys_kexec_load
293284 i386 waitid sys_waitid compat_sys_waitid
294# 285 sys_setaltroot
295286 i386 add_key sys_add_key
296287 i386 request_key sys_request_key
297288 i386 keyctl sys_keyctl
298289 i386 ioprio_set sys_ioprio_set
299290 i386 ioprio_get sys_ioprio_get
300291 i386 inotify_init sys_inotify_init
301292 i386 inotify_add_watch sys_inotify_add_watch
302293 i386 inotify_rm_watch sys_inotify_rm_watch
303294 i386 migrate_pages sys_migrate_pages
304295 i386 openat sys_openat compat_sys_openat
305296 i386 mkdirat sys_mkdirat
306297 i386 mknodat sys_mknodat
307298 i386 fchownat sys_fchownat
308299 i386 futimesat sys_futimesat compat_sys_futimesat
309300 i386 fstatat64 sys_fstatat64 sys32_fstatat
310301 i386 unlinkat sys_unlinkat
311302 i386 renameat sys_renameat
312303 i386 linkat sys_linkat
313304 i386 symlinkat sys_symlinkat
314305 i386 readlinkat sys_readlinkat
315306 i386 fchmodat sys_fchmodat
316307 i386 faccessat sys_faccessat
317308 i386 pselect6 sys_pselect6 compat_sys_pselect6
318309 i386 ppoll sys_ppoll compat_sys_ppoll
319310 i386 unshare sys_unshare
320311 i386 set_robust_list sys_set_robust_list compat_sys_set_robust_list
321312 i386 get_robust_list sys_get_robust_list compat_sys_get_robust_list
322313 i386 splice sys_splice
323314 i386 sync_file_range sys_sync_file_range sys32_sync_file_range
324315 i386 tee sys_tee
325316 i386 vmsplice sys_vmsplice compat_sys_vmsplice
326317 i386 move_pages sys_move_pages compat_sys_move_pages
327318 i386 getcpu sys_getcpu
328319 i386 epoll_pwait sys_epoll_pwait
329320 i386 utimensat sys_utimensat compat_sys_utimensat
330321 i386 signalfd sys_signalfd compat_sys_signalfd
331322 i386 timerfd_create sys_timerfd_create
332323 i386 eventfd sys_eventfd
333324 i386 fallocate sys_fallocate sys32_fallocate
334325 i386 timerfd_settime sys_timerfd_settime compat_sys_timerfd_settime
335326 i386 timerfd_gettime sys_timerfd_gettime compat_sys_timerfd_gettime
336327 i386 signalfd4 sys_signalfd4 compat_sys_signalfd4
337328 i386 eventfd2 sys_eventfd2
338329 i386 epoll_create1 sys_epoll_create1
339330 i386 dup3 sys_dup3
340331 i386 pipe2 sys_pipe2
341332 i386 inotify_init1 sys_inotify_init1
342333 i386 preadv sys_preadv compat_sys_preadv
343334 i386 pwritev sys_pwritev compat_sys_pwritev
344335 i386 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo
345336 i386 perf_event_open sys_perf_event_open
346337 i386 recvmmsg sys_recvmmsg compat_sys_recvmmsg
347338 i386 fanotify_init sys_fanotify_init
348339 i386 fanotify_mark sys_fanotify_mark sys32_fanotify_mark
349340 i386 prlimit64 sys_prlimit64
350341 i386 name_to_handle_at sys_name_to_handle_at
351342 i386 open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at
352343 i386 clock_adjtime sys_clock_adjtime compat_sys_clock_adjtime
353344 i386 syncfs sys_syncfs
354345 i386 sendmmsg sys_sendmmsg compat_sys_sendmmsg
355346 i386 setns sys_setns
356347 i386 process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv
357348 i386 process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
new file mode 100644
index 000000000000..b440a8f7eefa
--- /dev/null
+++ b/arch/x86/syscalls/syscall_64.tbl
@@ -0,0 +1,320 @@
1#
2# 64-bit system call numbers and entry vectors
3#
4# The format is:
5# <number> <abi> <name> <entry point>
6#
7# The abi is always "64" for this file (for now.)
8#
90 64 read sys_read
101 64 write sys_write
112 64 open sys_open
123 64 close sys_close
134 64 stat sys_newstat
145 64 fstat sys_newfstat
156 64 lstat sys_newlstat
167 64 poll sys_poll
178 64 lseek sys_lseek
189 64 mmap sys_mmap
1910 64 mprotect sys_mprotect
2011 64 munmap sys_munmap
2112 64 brk sys_brk
2213 64 rt_sigaction sys_rt_sigaction
2314 64 rt_sigprocmask sys_rt_sigprocmask
2415 64 rt_sigreturn stub_rt_sigreturn
2516 64 ioctl sys_ioctl
2617 64 pread64 sys_pread64
2718 64 pwrite64 sys_pwrite64
2819 64 readv sys_readv
2920 64 writev sys_writev
3021 64 access sys_access
3122 64 pipe sys_pipe
3223 64 select sys_select
3324 64 sched_yield sys_sched_yield
3425 64 mremap sys_mremap
3526 64 msync sys_msync
3627 64 mincore sys_mincore
3728 64 madvise sys_madvise
3829 64 shmget sys_shmget
3930 64 shmat sys_shmat
4031 64 shmctl sys_shmctl
4132 64 dup sys_dup
4233 64 dup2 sys_dup2
4334 64 pause sys_pause
4435 64 nanosleep sys_nanosleep
4536 64 getitimer sys_getitimer
4637 64 alarm sys_alarm
4738 64 setitimer sys_setitimer
4839 64 getpid sys_getpid
4940 64 sendfile sys_sendfile64
5041 64 socket sys_socket
5142 64 connect sys_connect
5243 64 accept sys_accept
5344 64 sendto sys_sendto
5445 64 recvfrom sys_recvfrom
5546 64 sendmsg sys_sendmsg
5647 64 recvmsg sys_recvmsg
5748 64 shutdown sys_shutdown
5849 64 bind sys_bind
5950 64 listen sys_listen
6051 64 getsockname sys_getsockname
6152 64 getpeername sys_getpeername
6253 64 socketpair sys_socketpair
6354 64 setsockopt sys_setsockopt
6455 64 getsockopt sys_getsockopt
6556 64 clone stub_clone
6657 64 fork stub_fork
6758 64 vfork stub_vfork
6859 64 execve stub_execve
6960 64 exit sys_exit
7061 64 wait4 sys_wait4
7162 64 kill sys_kill
7263 64 uname sys_newuname
7364 64 semget sys_semget
7465 64 semop sys_semop
7566 64 semctl sys_semctl
7667 64 shmdt sys_shmdt
7768 64 msgget sys_msgget
7869 64 msgsnd sys_msgsnd
7970 64 msgrcv sys_msgrcv
8071 64 msgctl sys_msgctl
8172 64 fcntl sys_fcntl
8273 64 flock sys_flock
8374 64 fsync sys_fsync
8475 64 fdatasync sys_fdatasync
8576 64 truncate sys_truncate
8677 64 ftruncate sys_ftruncate
8778 64 getdents sys_getdents
8879 64 getcwd sys_getcwd
8980 64 chdir sys_chdir
9081 64 fchdir sys_fchdir
9182 64 rename sys_rename
9283 64 mkdir sys_mkdir
9384 64 rmdir sys_rmdir
9485 64 creat sys_creat
9586 64 link sys_link
9687 64 unlink sys_unlink
9788 64 symlink sys_symlink
9889 64 readlink sys_readlink
9990 64 chmod sys_chmod
10091 64 fchmod sys_fchmod
10192 64 chown sys_chown
10293 64 fchown sys_fchown
10394 64 lchown sys_lchown
10495 64 umask sys_umask
10596 64 gettimeofday sys_gettimeofday
10697 64 getrlimit sys_getrlimit
10798 64 getrusage sys_getrusage
10899 64 sysinfo sys_sysinfo
109100 64 times sys_times
110101 64 ptrace sys_ptrace
111102 64 getuid sys_getuid
112103 64 syslog sys_syslog
113104 64 getgid sys_getgid
114105 64 setuid sys_setuid
115106 64 setgid sys_setgid
116107 64 geteuid sys_geteuid
117108 64 getegid sys_getegid
118109 64 setpgid sys_setpgid
119110 64 getppid sys_getppid
120111 64 getpgrp sys_getpgrp
121112 64 setsid sys_setsid
122113 64 setreuid sys_setreuid
123114 64 setregid sys_setregid
124115 64 getgroups sys_getgroups
125116 64 setgroups sys_setgroups
126117 64 setresuid sys_setresuid
127118 64 getresuid sys_getresuid
128119 64 setresgid sys_setresgid
129120 64 getresgid sys_getresgid
130121 64 getpgid sys_getpgid
131122 64 setfsuid sys_setfsuid
132123 64 setfsgid sys_setfsgid
133124 64 getsid sys_getsid
134125 64 capget sys_capget
135126 64 capset sys_capset
136127 64 rt_sigpending sys_rt_sigpending
137128 64 rt_sigtimedwait sys_rt_sigtimedwait
138129 64 rt_sigqueueinfo sys_rt_sigqueueinfo
139130 64 rt_sigsuspend sys_rt_sigsuspend
140131 64 sigaltstack stub_sigaltstack
141132 64 utime sys_utime
142133 64 mknod sys_mknod
143134 64 uselib
144135 64 personality sys_personality
145136 64 ustat sys_ustat
146137 64 statfs sys_statfs
147138 64 fstatfs sys_fstatfs
148139 64 sysfs sys_sysfs
149140 64 getpriority sys_getpriority
150141 64 setpriority sys_setpriority
151142 64 sched_setparam sys_sched_setparam
152143 64 sched_getparam sys_sched_getparam
153144 64 sched_setscheduler sys_sched_setscheduler
154145 64 sched_getscheduler sys_sched_getscheduler
155146 64 sched_get_priority_max sys_sched_get_priority_max
156147 64 sched_get_priority_min sys_sched_get_priority_min
157148 64 sched_rr_get_interval sys_sched_rr_get_interval
158149 64 mlock sys_mlock
159150 64 munlock sys_munlock
160151 64 mlockall sys_mlockall
161152 64 munlockall sys_munlockall
162153 64 vhangup sys_vhangup
163154 64 modify_ldt sys_modify_ldt
164155 64 pivot_root sys_pivot_root
165156 64 _sysctl sys_sysctl
166157 64 prctl sys_prctl
167158 64 arch_prctl sys_arch_prctl
168159 64 adjtimex sys_adjtimex
169160 64 setrlimit sys_setrlimit
170161 64 chroot sys_chroot
171162 64 sync sys_sync
172163 64 acct sys_acct
173164 64 settimeofday sys_settimeofday
174165 64 mount sys_mount
175166 64 umount2 sys_umount
176167 64 swapon sys_swapon
177168 64 swapoff sys_swapoff
178169 64 reboot sys_reboot
179170 64 sethostname sys_sethostname
180171 64 setdomainname sys_setdomainname
181172 64 iopl stub_iopl
182173 64 ioperm sys_ioperm
183174 64 create_module
184175 64 init_module sys_init_module
185176 64 delete_module sys_delete_module
186177 64 get_kernel_syms
187178 64 query_module
188179 64 quotactl sys_quotactl
189180 64 nfsservctl
190181 64 getpmsg
191182 64 putpmsg
192183 64 afs_syscall
193184 64 tuxcall
194185 64 security
195186 64 gettid sys_gettid
196187 64 readahead sys_readahead
197188 64 setxattr sys_setxattr
198189 64 lsetxattr sys_lsetxattr
199190 64 fsetxattr sys_fsetxattr
200191 64 getxattr sys_getxattr
201192 64 lgetxattr sys_lgetxattr
202193 64 fgetxattr sys_fgetxattr
203194 64 listxattr sys_listxattr
204195 64 llistxattr sys_llistxattr
205196 64 flistxattr sys_flistxattr
206197 64 removexattr sys_removexattr
207198 64 lremovexattr sys_lremovexattr
208199 64 fremovexattr sys_fremovexattr
209200 64 tkill sys_tkill
210201 64 time sys_time
211202 64 futex sys_futex
212203 64 sched_setaffinity sys_sched_setaffinity
213204 64 sched_getaffinity sys_sched_getaffinity
214205 64 set_thread_area
215206 64 io_setup sys_io_setup
216207 64 io_destroy sys_io_destroy
217208 64 io_getevents sys_io_getevents
218209 64 io_submit sys_io_submit
219210 64 io_cancel sys_io_cancel
220211 64 get_thread_area
221212 64 lookup_dcookie sys_lookup_dcookie
222213 64 epoll_create sys_epoll_create
223214 64 epoll_ctl_old
224215 64 epoll_wait_old
225216 64 remap_file_pages sys_remap_file_pages
226217 64 getdents64 sys_getdents64
227218 64 set_tid_address sys_set_tid_address
228219 64 restart_syscall sys_restart_syscall
229220 64 semtimedop sys_semtimedop
230221 64 fadvise64 sys_fadvise64
231222 64 timer_create sys_timer_create
232223 64 timer_settime sys_timer_settime
233224 64 timer_gettime sys_timer_gettime
234225 64 timer_getoverrun sys_timer_getoverrun
235226 64 timer_delete sys_timer_delete
236227 64 clock_settime sys_clock_settime
237228 64 clock_gettime sys_clock_gettime
238229 64 clock_getres sys_clock_getres
239230 64 clock_nanosleep sys_clock_nanosleep
240231 64 exit_group sys_exit_group
241232 64 epoll_wait sys_epoll_wait
242233 64 epoll_ctl sys_epoll_ctl
243234 64 tgkill sys_tgkill
244235 64 utimes sys_utimes
245236 64 vserver
246237 64 mbind sys_mbind
247238 64 set_mempolicy sys_set_mempolicy
248239 64 get_mempolicy sys_get_mempolicy
249240 64 mq_open sys_mq_open
250241 64 mq_unlink sys_mq_unlink
251242 64 mq_timedsend sys_mq_timedsend
252243 64 mq_timedreceive sys_mq_timedreceive
253244 64 mq_notify sys_mq_notify
254245 64 mq_getsetattr sys_mq_getsetattr
255246 64 kexec_load sys_kexec_load
256247 64 waitid sys_waitid
257248 64 add_key sys_add_key
258249 64 request_key sys_request_key
259250 64 keyctl sys_keyctl
260251 64 ioprio_set sys_ioprio_set
261252 64 ioprio_get sys_ioprio_get
262253 64 inotify_init sys_inotify_init
263254 64 inotify_add_watch sys_inotify_add_watch
264255 64 inotify_rm_watch sys_inotify_rm_watch
265256 64 migrate_pages sys_migrate_pages
266257 64 openat sys_openat
267258 64 mkdirat sys_mkdirat
268259 64 mknodat sys_mknodat
269260 64 fchownat sys_fchownat
270261 64 futimesat sys_futimesat
271262 64 newfstatat sys_newfstatat
272263 64 unlinkat sys_unlinkat
273264 64 renameat sys_renameat
274265 64 linkat sys_linkat
275266 64 symlinkat sys_symlinkat
276267 64 readlinkat sys_readlinkat
277268 64 fchmodat sys_fchmodat
278269 64 faccessat sys_faccessat
279270 64 pselect6 sys_pselect6
280271 64 ppoll sys_ppoll
281272 64 unshare sys_unshare
282273 64 set_robust_list sys_set_robust_list
283274 64 get_robust_list sys_get_robust_list
284275 64 splice sys_splice
285276 64 tee sys_tee
286277 64 sync_file_range sys_sync_file_range
287278 64 vmsplice sys_vmsplice
288279 64 move_pages sys_move_pages
289280 64 utimensat sys_utimensat
290281 64 epoll_pwait sys_epoll_pwait
291282 64 signalfd sys_signalfd
292283 64 timerfd_create sys_timerfd_create
293284 64 eventfd sys_eventfd
294285 64 fallocate sys_fallocate
295286 64 timerfd_settime sys_timerfd_settime
296287 64 timerfd_gettime sys_timerfd_gettime
297288 64 accept4 sys_accept4
298289 64 signalfd4 sys_signalfd4
299290 64 eventfd2 sys_eventfd2
300291 64 epoll_create1 sys_epoll_create1
301292 64 dup3 sys_dup3
302293 64 pipe2 sys_pipe2
303294 64 inotify_init1 sys_inotify_init1
304295 64 preadv sys_preadv
305296 64 pwritev sys_pwritev
306297 64 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo
307298 64 perf_event_open sys_perf_event_open
308299 64 recvmmsg sys_recvmmsg
309300 64 fanotify_init sys_fanotify_init
310301 64 fanotify_mark sys_fanotify_mark
311302 64 prlimit64 sys_prlimit64
312303 64 name_to_handle_at sys_name_to_handle_at
313304 64 open_by_handle_at sys_open_by_handle_at
314305 64 clock_adjtime sys_clock_adjtime
315306 64 syncfs sys_syncfs
316307 64 sendmmsg sys_sendmmsg
317308 64 setns sys_setns
318309 64 getcpu sys_getcpu
319310 64 process_vm_readv sys_process_vm_readv
320311 64 process_vm_writev sys_process_vm_writev
diff --git a/arch/x86/syscalls/syscallhdr.sh b/arch/x86/syscalls/syscallhdr.sh
new file mode 100644
index 000000000000..0d473ff12eaf
--- /dev/null
+++ b/arch/x86/syscalls/syscallhdr.sh
@@ -0,0 +1,36 @@
1#!/bin/sh
2
3in="$1"
4out="$2"
5my_abis=`echo "$3" | tr ',' ' '`
6prefix="$4"
7offset="$5"
8
9fileguard=_ASM_X86_`basename "$out" | sed \
10 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
11 -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
12
13in_list () {
14 local x
15 for x in $1; do
16 if [ x"$x" = x"$2" ]; then
17 return 0
18 fi
19 done
20 return 1
21}
22
23grep '^[0-9]' "$in" | sort -n | (
24 echo "#ifndef ${fileguard}"
25 echo "#define ${fileguard} 1"
26 echo ""
27
28 while read nr abi name entry ; do
29 if in_list "$my_abis" "$abi"; then
30 echo "#define __NR_${prefix}${name}" $((nr+offset))
31 fi
32 done
33
34 echo ""
35 echo "#endif /* ${fileguard} */"
36) > "$out"
diff --git a/arch/x86/syscalls/syscalltbl.sh b/arch/x86/syscalls/syscalltbl.sh
new file mode 100644
index 000000000000..0e7f8ec071e7
--- /dev/null
+++ b/arch/x86/syscalls/syscalltbl.sh
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3in="$1"
4out="$2"
5
6grep '^[0-9]' "$in" | sort -n | (
7 while read nr abi name entry compat; do
8 abi=`echo "$abi" | tr '[a-z]' '[A-Z]'`
9 if [ -n "$compat" ]; then
10 echo "__SYSCALL_${abi}($nr, $entry, $compat)"
11 elif [ -n "$entry" ]; then
12 echo "__SYSCALL_${abi}($nr, $entry, $entry)"
13 fi
14 done
15) > "$out"