blob: 3336406080874bf2bd06cb1f0563aea6d8e56650 [file] [log] [blame]
David Howells8a1ab312012-10-04 18:20:15 +01001#include <asm/bitsperlong.h>
2
3/*
4 * This file contains the system call numbers, based on the
5 * layout of the x86-64 architecture, which embeds the
6 * pointer to the syscall in the table.
7 *
8 * As a basic principle, no duplication of functionality
9 * should be added, e.g. we don't use lseek when llseek
10 * is present. New architectures should use this file
11 * and implement the less feature-full calls in user space.
12 */
13
14#ifndef __SYSCALL
15#define __SYSCALL(x, y)
16#endif
17
18#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
19#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
20#else
21#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
22#endif
23
24#ifdef __SYSCALL_COMPAT
25#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp)
26#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp)
27#else
28#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
29#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64)
30#endif
31
32#define __NR_io_setup 0
33__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
34#define __NR_io_destroy 1
35__SYSCALL(__NR_io_destroy, sys_io_destroy)
36#define __NR_io_submit 2
37__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
38#define __NR_io_cancel 3
39__SYSCALL(__NR_io_cancel, sys_io_cancel)
40#define __NR_io_getevents 4
41__SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents)
42
43/* fs/xattr.c */
44#define __NR_setxattr 5
45__SYSCALL(__NR_setxattr, sys_setxattr)
46#define __NR_lsetxattr 6
47__SYSCALL(__NR_lsetxattr, sys_lsetxattr)
48#define __NR_fsetxattr 7
49__SYSCALL(__NR_fsetxattr, sys_fsetxattr)
50#define __NR_getxattr 8
51__SYSCALL(__NR_getxattr, sys_getxattr)
52#define __NR_lgetxattr 9
53__SYSCALL(__NR_lgetxattr, sys_lgetxattr)
54#define __NR_fgetxattr 10
55__SYSCALL(__NR_fgetxattr, sys_fgetxattr)
56#define __NR_listxattr 11
57__SYSCALL(__NR_listxattr, sys_listxattr)
58#define __NR_llistxattr 12
59__SYSCALL(__NR_llistxattr, sys_llistxattr)
60#define __NR_flistxattr 13
61__SYSCALL(__NR_flistxattr, sys_flistxattr)
62#define __NR_removexattr 14
63__SYSCALL(__NR_removexattr, sys_removexattr)
64#define __NR_lremovexattr 15
65__SYSCALL(__NR_lremovexattr, sys_lremovexattr)
66#define __NR_fremovexattr 16
67__SYSCALL(__NR_fremovexattr, sys_fremovexattr)
68
69/* fs/dcache.c */
70#define __NR_getcwd 17
71__SYSCALL(__NR_getcwd, sys_getcwd)
72
73/* fs/cookies.c */
74#define __NR_lookup_dcookie 18
75__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie)
76
77/* fs/eventfd.c */
78#define __NR_eventfd2 19
79__SYSCALL(__NR_eventfd2, sys_eventfd2)
80
81/* fs/eventpoll.c */
82#define __NR_epoll_create1 20
83__SYSCALL(__NR_epoll_create1, sys_epoll_create1)
84#define __NR_epoll_ctl 21
85__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
86#define __NR_epoll_pwait 22
87__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait)
88
89/* fs/fcntl.c */
90#define __NR_dup 23
91__SYSCALL(__NR_dup, sys_dup)
92#define __NR_dup3 24
93__SYSCALL(__NR_dup3, sys_dup3)
94#define __NR3264_fcntl 25
95__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64)
96
97/* fs/inotify_user.c */
98#define __NR_inotify_init1 26
99__SYSCALL(__NR_inotify_init1, sys_inotify_init1)
100#define __NR_inotify_add_watch 27
101__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
102#define __NR_inotify_rm_watch 28
103__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
104
105/* fs/ioctl.c */
106#define __NR_ioctl 29
107__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl)
108
109/* fs/ioprio.c */
110#define __NR_ioprio_set 30
111__SYSCALL(__NR_ioprio_set, sys_ioprio_set)
112#define __NR_ioprio_get 31
113__SYSCALL(__NR_ioprio_get, sys_ioprio_get)
114
115/* fs/locks.c */
116#define __NR_flock 32
117__SYSCALL(__NR_flock, sys_flock)
118
119/* fs/namei.c */
120#define __NR_mknodat 33
121__SYSCALL(__NR_mknodat, sys_mknodat)
122#define __NR_mkdirat 34
123__SYSCALL(__NR_mkdirat, sys_mkdirat)
124#define __NR_unlinkat 35
125__SYSCALL(__NR_unlinkat, sys_unlinkat)
126#define __NR_symlinkat 36
127__SYSCALL(__NR_symlinkat, sys_symlinkat)
128#define __NR_linkat 37
129__SYSCALL(__NR_linkat, sys_linkat)
130#define __NR_renameat 38
131__SYSCALL(__NR_renameat, sys_renameat)
132
133/* fs/namespace.c */
134#define __NR_umount2 39
135__SYSCALL(__NR_umount2, sys_umount)
136#define __NR_mount 40
137__SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
138#define __NR_pivot_root 41
139__SYSCALL(__NR_pivot_root, sys_pivot_root)
140
141/* fs/nfsctl.c */
142#define __NR_nfsservctl 42
143__SYSCALL(__NR_nfsservctl, sys_ni_syscall)
144
145/* fs/open.c */
146#define __NR3264_statfs 43
147__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \
148 compat_sys_statfs64)
149#define __NR3264_fstatfs 44
150__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \
151 compat_sys_fstatfs64)
152#define __NR3264_truncate 45
153__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \
154 compat_sys_truncate64)
155#define __NR3264_ftruncate 46
156__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \
157 compat_sys_ftruncate64)
158
159#define __NR_fallocate 47
160__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
161#define __NR_faccessat 48
162__SYSCALL(__NR_faccessat, sys_faccessat)
163#define __NR_chdir 49
164__SYSCALL(__NR_chdir, sys_chdir)
165#define __NR_fchdir 50
166__SYSCALL(__NR_fchdir, sys_fchdir)
167#define __NR_chroot 51
168__SYSCALL(__NR_chroot, sys_chroot)
169#define __NR_fchmod 52
170__SYSCALL(__NR_fchmod, sys_fchmod)
171#define __NR_fchmodat 53
172__SYSCALL(__NR_fchmodat, sys_fchmodat)
173#define __NR_fchownat 54
174__SYSCALL(__NR_fchownat, sys_fchownat)
175#define __NR_fchown 55
176__SYSCALL(__NR_fchown, sys_fchown)
177#define __NR_openat 56
178__SC_COMP(__NR_openat, sys_openat, compat_sys_openat)
179#define __NR_close 57
180__SYSCALL(__NR_close, sys_close)
181#define __NR_vhangup 58
182__SYSCALL(__NR_vhangup, sys_vhangup)
183
184/* fs/pipe.c */
185#define __NR_pipe2 59
186__SYSCALL(__NR_pipe2, sys_pipe2)
187
188/* fs/quota.c */
189#define __NR_quotactl 60
190__SYSCALL(__NR_quotactl, sys_quotactl)
191
192/* fs/readdir.c */
193#define __NR_getdents64 61
Heiko Carstens0473c9b2014-03-03 10:44:03 +0100194#define __ARCH_WANT_COMPAT_SYS_GETDENTS64
David Howells8a1ab312012-10-04 18:20:15 +0100195__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64)
196
197/* fs/read_write.c */
198#define __NR3264_lseek 62
199__SC_3264(__NR3264_lseek, sys_llseek, sys_lseek)
200#define __NR_read 63
201__SYSCALL(__NR_read, sys_read)
202#define __NR_write 64
203__SYSCALL(__NR_write, sys_write)
204#define __NR_readv 65
205__SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
206#define __NR_writev 66
207__SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
208#define __NR_pread64 67
209__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
210#define __NR_pwrite64 68
211__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64)
212#define __NR_preadv 69
213__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv)
214#define __NR_pwritev 70
215__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
216
217/* fs/sendfile.c */
218#define __NR3264_sendfile 71
219__SYSCALL(__NR3264_sendfile, sys_sendfile64)
220
221/* fs/select.c */
222#define __NR_pselect6 72
223__SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6)
224#define __NR_ppoll 73
225__SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll)
226
227/* fs/signalfd.c */
228#define __NR_signalfd4 74
229__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
230
231/* fs/splice.c */
232#define __NR_vmsplice 75
233__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
234#define __NR_splice 76
235__SYSCALL(__NR_splice, sys_splice)
236#define __NR_tee 77
237__SYSCALL(__NR_tee, sys_tee)
238
239/* fs/stat.c */
240#define __NR_readlinkat 78
241__SYSCALL(__NR_readlinkat, sys_readlinkat)
242#define __NR3264_fstatat 79
243__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
244#define __NR3264_fstat 80
245__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
246
247/* fs/sync.c */
248#define __NR_sync 81
249__SYSCALL(__NR_sync, sys_sync)
250#define __NR_fsync 82
251__SYSCALL(__NR_fsync, sys_fsync)
252#define __NR_fdatasync 83
253__SYSCALL(__NR_fdatasync, sys_fdatasync)
254#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
255#define __NR_sync_file_range2 84
256__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \
257 compat_sys_sync_file_range2)
258#else
259#define __NR_sync_file_range 84
260__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \
261 compat_sys_sync_file_range)
262#endif
263
264/* fs/timerfd.c */
265#define __NR_timerfd_create 85
266__SYSCALL(__NR_timerfd_create, sys_timerfd_create)
267#define __NR_timerfd_settime 86
268__SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \
269 compat_sys_timerfd_settime)
270#define __NR_timerfd_gettime 87
271__SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \
272 compat_sys_timerfd_gettime)
273
274/* fs/utimes.c */
275#define __NR_utimensat 88
276__SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat)
277
278/* kernel/acct.c */
279#define __NR_acct 89
280__SYSCALL(__NR_acct, sys_acct)
281
282/* kernel/capability.c */
283#define __NR_capget 90
284__SYSCALL(__NR_capget, sys_capget)
285#define __NR_capset 91
286__SYSCALL(__NR_capset, sys_capset)
287
288/* kernel/exec_domain.c */
289#define __NR_personality 92
290__SYSCALL(__NR_personality, sys_personality)
291
292/* kernel/exit.c */
293#define __NR_exit 93
294__SYSCALL(__NR_exit, sys_exit)
295#define __NR_exit_group 94
296__SYSCALL(__NR_exit_group, sys_exit_group)
297#define __NR_waitid 95
298__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid)
299
300/* kernel/fork.c */
301#define __NR_set_tid_address 96
302__SYSCALL(__NR_set_tid_address, sys_set_tid_address)
303#define __NR_unshare 97
304__SYSCALL(__NR_unshare, sys_unshare)
305
306/* kernel/futex.c */
307#define __NR_futex 98
308__SC_COMP(__NR_futex, sys_futex, compat_sys_futex)
309#define __NR_set_robust_list 99
310__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
311 compat_sys_set_robust_list)
312#define __NR_get_robust_list 100
313__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \
314 compat_sys_get_robust_list)
315
316/* kernel/hrtimer.c */
317#define __NR_nanosleep 101
318__SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep)
319
320/* kernel/itimer.c */
321#define __NR_getitimer 102
322__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer)
323#define __NR_setitimer 103
324__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer)
325
326/* kernel/kexec.c */
327#define __NR_kexec_load 104
328__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load)
329
330/* kernel/module.c */
331#define __NR_init_module 105
332__SYSCALL(__NR_init_module, sys_init_module)
333#define __NR_delete_module 106
334__SYSCALL(__NR_delete_module, sys_delete_module)
335
336/* kernel/posix-timers.c */
337#define __NR_timer_create 107
338__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
339#define __NR_timer_gettime 108
340__SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime)
341#define __NR_timer_getoverrun 109
342__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
343#define __NR_timer_settime 110
344__SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime)
345#define __NR_timer_delete 111
346__SYSCALL(__NR_timer_delete, sys_timer_delete)
347#define __NR_clock_settime 112
348__SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime)
349#define __NR_clock_gettime 113
350__SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime)
351#define __NR_clock_getres 114
352__SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres)
353#define __NR_clock_nanosleep 115
354__SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \
355 compat_sys_clock_nanosleep)
356
357/* kernel/printk.c */
358#define __NR_syslog 116
359__SYSCALL(__NR_syslog, sys_syslog)
360
361/* kernel/ptrace.c */
362#define __NR_ptrace 117
363__SYSCALL(__NR_ptrace, sys_ptrace)
364
Viresh Kumar0a0fca92013-06-04 13:10:24 +0530365/* kernel/sched/core.c */
David Howells8a1ab312012-10-04 18:20:15 +0100366#define __NR_sched_setparam 118
367__SYSCALL(__NR_sched_setparam, sys_sched_setparam)
368#define __NR_sched_setscheduler 119
369__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
370#define __NR_sched_getscheduler 120
371__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
372#define __NR_sched_getparam 121
373__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
374#define __NR_sched_setaffinity 122
375__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \
376 compat_sys_sched_setaffinity)
377#define __NR_sched_getaffinity 123
378__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \
379 compat_sys_sched_getaffinity)
380#define __NR_sched_yield 124
381__SYSCALL(__NR_sched_yield, sys_sched_yield)
382#define __NR_sched_get_priority_max 125
383__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
384#define __NR_sched_get_priority_min 126
385__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
386#define __NR_sched_rr_get_interval 127
387__SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \
388 compat_sys_sched_rr_get_interval)
389
390/* kernel/signal.c */
391#define __NR_restart_syscall 128
392__SYSCALL(__NR_restart_syscall, sys_restart_syscall)
393#define __NR_kill 129
394__SYSCALL(__NR_kill, sys_kill)
395#define __NR_tkill 130
396__SYSCALL(__NR_tkill, sys_tkill)
397#define __NR_tgkill 131
398__SYSCALL(__NR_tgkill, sys_tgkill)
399#define __NR_sigaltstack 132
400__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack)
401#define __NR_rt_sigsuspend 133
402__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend)
403#define __NR_rt_sigaction 134
404__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction)
405#define __NR_rt_sigprocmask 135
Al Viro03e27592012-12-25 13:58:56 -0500406__SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask)
David Howells8a1ab312012-10-04 18:20:15 +0100407#define __NR_rt_sigpending 136
Al Viro03e27592012-12-25 13:58:56 -0500408__SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending)
David Howells8a1ab312012-10-04 18:20:15 +0100409#define __NR_rt_sigtimedwait 137
410__SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \
411 compat_sys_rt_sigtimedwait)
412#define __NR_rt_sigqueueinfo 138
413__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
414 compat_sys_rt_sigqueueinfo)
415#define __NR_rt_sigreturn 139
416__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn)
417
418/* kernel/sys.c */
419#define __NR_setpriority 140
420__SYSCALL(__NR_setpriority, sys_setpriority)
421#define __NR_getpriority 141
422__SYSCALL(__NR_getpriority, sys_getpriority)
423#define __NR_reboot 142
424__SYSCALL(__NR_reboot, sys_reboot)
425#define __NR_setregid 143
426__SYSCALL(__NR_setregid, sys_setregid)
427#define __NR_setgid 144
428__SYSCALL(__NR_setgid, sys_setgid)
429#define __NR_setreuid 145
430__SYSCALL(__NR_setreuid, sys_setreuid)
431#define __NR_setuid 146
432__SYSCALL(__NR_setuid, sys_setuid)
433#define __NR_setresuid 147
434__SYSCALL(__NR_setresuid, sys_setresuid)
435#define __NR_getresuid 148
436__SYSCALL(__NR_getresuid, sys_getresuid)
437#define __NR_setresgid 149
438__SYSCALL(__NR_setresgid, sys_setresgid)
439#define __NR_getresgid 150
440__SYSCALL(__NR_getresgid, sys_getresgid)
441#define __NR_setfsuid 151
442__SYSCALL(__NR_setfsuid, sys_setfsuid)
443#define __NR_setfsgid 152
444__SYSCALL(__NR_setfsgid, sys_setfsgid)
445#define __NR_times 153
446__SC_COMP(__NR_times, sys_times, compat_sys_times)
447#define __NR_setpgid 154
448__SYSCALL(__NR_setpgid, sys_setpgid)
449#define __NR_getpgid 155
450__SYSCALL(__NR_getpgid, sys_getpgid)
451#define __NR_getsid 156
452__SYSCALL(__NR_getsid, sys_getsid)
453#define __NR_setsid 157
454__SYSCALL(__NR_setsid, sys_setsid)
455#define __NR_getgroups 158
456__SYSCALL(__NR_getgroups, sys_getgroups)
457#define __NR_setgroups 159
458__SYSCALL(__NR_setgroups, sys_setgroups)
459#define __NR_uname 160
460__SYSCALL(__NR_uname, sys_newuname)
461#define __NR_sethostname 161
462__SYSCALL(__NR_sethostname, sys_sethostname)
463#define __NR_setdomainname 162
464__SYSCALL(__NR_setdomainname, sys_setdomainname)
465#define __NR_getrlimit 163
466__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
467#define __NR_setrlimit 164
468__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
469#define __NR_getrusage 165
470__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
471#define __NR_umask 166
472__SYSCALL(__NR_umask, sys_umask)
473#define __NR_prctl 167
474__SYSCALL(__NR_prctl, sys_prctl)
475#define __NR_getcpu 168
476__SYSCALL(__NR_getcpu, sys_getcpu)
477
478/* kernel/time.c */
479#define __NR_gettimeofday 169
480__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
481#define __NR_settimeofday 170
482__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
483#define __NR_adjtimex 171
484__SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex)
485
486/* kernel/timer.c */
487#define __NR_getpid 172
488__SYSCALL(__NR_getpid, sys_getpid)
489#define __NR_getppid 173
490__SYSCALL(__NR_getppid, sys_getppid)
491#define __NR_getuid 174
492__SYSCALL(__NR_getuid, sys_getuid)
493#define __NR_geteuid 175
494__SYSCALL(__NR_geteuid, sys_geteuid)
495#define __NR_getgid 176
496__SYSCALL(__NR_getgid, sys_getgid)
497#define __NR_getegid 177
498__SYSCALL(__NR_getegid, sys_getegid)
499#define __NR_gettid 178
500__SYSCALL(__NR_gettid, sys_gettid)
501#define __NR_sysinfo 179
502__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo)
503
504/* ipc/mqueue.c */
505#define __NR_mq_open 180
506__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
507#define __NR_mq_unlink 181
508__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
509#define __NR_mq_timedsend 182
510__SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend)
511#define __NR_mq_timedreceive 183
512__SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \
513 compat_sys_mq_timedreceive)
514#define __NR_mq_notify 184
515__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
516#define __NR_mq_getsetattr 185
517__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr)
518
519/* ipc/msg.c */
520#define __NR_msgget 186
521__SYSCALL(__NR_msgget, sys_msgget)
522#define __NR_msgctl 187
523__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl)
524#define __NR_msgrcv 188
525__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv)
526#define __NR_msgsnd 189
527__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
528
529/* ipc/sem.c */
530#define __NR_semget 190
531__SYSCALL(__NR_semget, sys_semget)
532#define __NR_semctl 191
533__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
534#define __NR_semtimedop 192
535__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop)
536#define __NR_semop 193
537__SYSCALL(__NR_semop, sys_semop)
538
539/* ipc/shm.c */
540#define __NR_shmget 194
541__SYSCALL(__NR_shmget, sys_shmget)
542#define __NR_shmctl 195
543__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl)
544#define __NR_shmat 196
545__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat)
546#define __NR_shmdt 197
547__SYSCALL(__NR_shmdt, sys_shmdt)
548
549/* net/socket.c */
550#define __NR_socket 198
551__SYSCALL(__NR_socket, sys_socket)
552#define __NR_socketpair 199
553__SYSCALL(__NR_socketpair, sys_socketpair)
554#define __NR_bind 200
555__SYSCALL(__NR_bind, sys_bind)
556#define __NR_listen 201
557__SYSCALL(__NR_listen, sys_listen)
558#define __NR_accept 202
559__SYSCALL(__NR_accept, sys_accept)
560#define __NR_connect 203
561__SYSCALL(__NR_connect, sys_connect)
562#define __NR_getsockname 204
563__SYSCALL(__NR_getsockname, sys_getsockname)
564#define __NR_getpeername 205
565__SYSCALL(__NR_getpeername, sys_getpeername)
566#define __NR_sendto 206
567__SYSCALL(__NR_sendto, sys_sendto)
568#define __NR_recvfrom 207
569__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
570#define __NR_setsockopt 208
571__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
572#define __NR_getsockopt 209
573__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
574#define __NR_shutdown 210
575__SYSCALL(__NR_shutdown, sys_shutdown)
576#define __NR_sendmsg 211
577__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg)
578#define __NR_recvmsg 212
579__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg)
580
581/* mm/filemap.c */
582#define __NR_readahead 213
583__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead)
584
585/* mm/nommu.c, also with MMU */
586#define __NR_brk 214
587__SYSCALL(__NR_brk, sys_brk)
588#define __NR_munmap 215
589__SYSCALL(__NR_munmap, sys_munmap)
590#define __NR_mremap 216
591__SYSCALL(__NR_mremap, sys_mremap)
592
593/* security/keys/keyctl.c */
594#define __NR_add_key 217
595__SYSCALL(__NR_add_key, sys_add_key)
596#define __NR_request_key 218
597__SYSCALL(__NR_request_key, sys_request_key)
598#define __NR_keyctl 219
599__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl)
600
601/* arch/example/kernel/sys_example.c */
602#define __NR_clone 220
603__SYSCALL(__NR_clone, sys_clone)
604#define __NR_execve 221
605__SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
606
607#define __NR3264_mmap 222
608__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
609/* mm/fadvise.c */
610#define __NR3264_fadvise64 223
611__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
612
613/* mm/, CONFIG_MMU only */
614#ifndef __ARCH_NOMMU
615#define __NR_swapon 224
616__SYSCALL(__NR_swapon, sys_swapon)
617#define __NR_swapoff 225
618__SYSCALL(__NR_swapoff, sys_swapoff)
619#define __NR_mprotect 226
620__SYSCALL(__NR_mprotect, sys_mprotect)
621#define __NR_msync 227
622__SYSCALL(__NR_msync, sys_msync)
623#define __NR_mlock 228
624__SYSCALL(__NR_mlock, sys_mlock)
625#define __NR_munlock 229
626__SYSCALL(__NR_munlock, sys_munlock)
627#define __NR_mlockall 230
628__SYSCALL(__NR_mlockall, sys_mlockall)
629#define __NR_munlockall 231
630__SYSCALL(__NR_munlockall, sys_munlockall)
631#define __NR_mincore 232
632__SYSCALL(__NR_mincore, sys_mincore)
633#define __NR_madvise 233
634__SYSCALL(__NR_madvise, sys_madvise)
635#define __NR_remap_file_pages 234
636__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
637#define __NR_mbind 235
638__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
639#define __NR_get_mempolicy 236
640__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
641#define __NR_set_mempolicy 237
642__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
643#define __NR_migrate_pages 238
644__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
645#define __NR_move_pages 239
646__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
647#endif
648
649#define __NR_rt_tgsigqueueinfo 240
650__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \
651 compat_sys_rt_tgsigqueueinfo)
652#define __NR_perf_event_open 241
653__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
654#define __NR_accept4 242
655__SYSCALL(__NR_accept4, sys_accept4)
656#define __NR_recvmmsg 243
657__SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg)
658
659/*
660 * Architectures may provide up to 16 syscalls of their own
661 * starting with this value.
662 */
663#define __NR_arch_specific_syscall 244
664
665#define __NR_wait4 260
666__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
667#define __NR_prlimit64 261
668__SYSCALL(__NR_prlimit64, sys_prlimit64)
669#define __NR_fanotify_init 262
670__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
671#define __NR_fanotify_mark 263
672__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
673#define __NR_name_to_handle_at 264
674__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
675#define __NR_open_by_handle_at 265
676__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \
677 compat_sys_open_by_handle_at)
678#define __NR_clock_adjtime 266
679__SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime)
680#define __NR_syncfs 267
681__SYSCALL(__NR_syncfs, sys_syncfs)
682#define __NR_setns 268
683__SYSCALL(__NR_setns, sys_setns)
684#define __NR_sendmmsg 269
685__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
686#define __NR_process_vm_readv 270
687__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
688 compat_sys_process_vm_readv)
689#define __NR_process_vm_writev 271
690__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
691 compat_sys_process_vm_writev)
692#define __NR_kcmp 272
693__SYSCALL(__NR_kcmp, sys_kcmp)
Kees Cook1625cee2012-10-16 12:40:03 +1030694#define __NR_finit_module 273
695__SYSCALL(__NR_finit_module, sys_finit_module)
James Hogane6cfc022014-02-03 15:33:37 +0000696#define __NR_sched_setattr 274
697__SYSCALL(__NR_sched_setattr, sys_sched_setattr)
698#define __NR_sched_getattr 275
699__SYSCALL(__NR_sched_getattr, sys_sched_getattr)
James Hogan63ba6002014-04-23 11:08:05 +0100700#define __NR_renameat2 276
701__SYSCALL(__NR_renameat2, sys_renameat2)
David Howells8a1ab312012-10-04 18:20:15 +0100702
703#undef __NR_syscalls
James Hogan63ba6002014-04-23 11:08:05 +0100704#define __NR_syscalls 277
David Howells8a1ab312012-10-04 18:20:15 +0100705
706/*
707 * All syscalls below here should go away really,
708 * these are provided for both review and as a porting
709 * help for the C library version.
710*
711 * Last chance: are any of these important enough to
712 * enable by default?
713 */
714#ifdef __ARCH_WANT_SYSCALL_NO_AT
715#define __NR_open 1024
716__SYSCALL(__NR_open, sys_open)
717#define __NR_link 1025
718__SYSCALL(__NR_link, sys_link)
719#define __NR_unlink 1026
720__SYSCALL(__NR_unlink, sys_unlink)
721#define __NR_mknod 1027
722__SYSCALL(__NR_mknod, sys_mknod)
723#define __NR_chmod 1028
724__SYSCALL(__NR_chmod, sys_chmod)
725#define __NR_chown 1029
726__SYSCALL(__NR_chown, sys_chown)
727#define __NR_mkdir 1030
728__SYSCALL(__NR_mkdir, sys_mkdir)
729#define __NR_rmdir 1031
730__SYSCALL(__NR_rmdir, sys_rmdir)
731#define __NR_lchown 1032
732__SYSCALL(__NR_lchown, sys_lchown)
733#define __NR_access 1033
734__SYSCALL(__NR_access, sys_access)
735#define __NR_rename 1034
736__SYSCALL(__NR_rename, sys_rename)
737#define __NR_readlink 1035
738__SYSCALL(__NR_readlink, sys_readlink)
739#define __NR_symlink 1036
740__SYSCALL(__NR_symlink, sys_symlink)
741#define __NR_utimes 1037
742__SYSCALL(__NR_utimes, sys_utimes)
743#define __NR3264_stat 1038
744__SC_3264(__NR3264_stat, sys_stat64, sys_newstat)
745#define __NR3264_lstat 1039
746__SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat)
747
748#undef __NR_syscalls
749#define __NR_syscalls (__NR3264_lstat+1)
750#endif /* __ARCH_WANT_SYSCALL_NO_AT */
751
752#ifdef __ARCH_WANT_SYSCALL_NO_FLAGS
753#define __NR_pipe 1040
754__SYSCALL(__NR_pipe, sys_pipe)
755#define __NR_dup2 1041
756__SYSCALL(__NR_dup2, sys_dup2)
757#define __NR_epoll_create 1042
758__SYSCALL(__NR_epoll_create, sys_epoll_create)
759#define __NR_inotify_init 1043
760__SYSCALL(__NR_inotify_init, sys_inotify_init)
761#define __NR_eventfd 1044
762__SYSCALL(__NR_eventfd, sys_eventfd)
763#define __NR_signalfd 1045
764__SYSCALL(__NR_signalfd, sys_signalfd)
765
766#undef __NR_syscalls
767#define __NR_syscalls (__NR_signalfd+1)
768#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */
769
770#if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \
771 defined(__ARCH_WANT_SYSCALL_OFF_T)
772#define __NR_sendfile 1046
773__SYSCALL(__NR_sendfile, sys_sendfile)
774#define __NR_ftruncate 1047
775__SYSCALL(__NR_ftruncate, sys_ftruncate)
776#define __NR_truncate 1048
777__SYSCALL(__NR_truncate, sys_truncate)
778#define __NR_stat 1049
779__SYSCALL(__NR_stat, sys_newstat)
780#define __NR_lstat 1050
781__SYSCALL(__NR_lstat, sys_newlstat)
782#define __NR_fstat 1051
783__SYSCALL(__NR_fstat, sys_newfstat)
784#define __NR_fcntl 1052
785__SYSCALL(__NR_fcntl, sys_fcntl)
786#define __NR_fadvise64 1053
787#define __ARCH_WANT_SYS_FADVISE64
788__SYSCALL(__NR_fadvise64, sys_fadvise64)
789#define __NR_newfstatat 1054
790#define __ARCH_WANT_SYS_NEWFSTATAT
791__SYSCALL(__NR_newfstatat, sys_newfstatat)
792#define __NR_fstatfs 1055
793__SYSCALL(__NR_fstatfs, sys_fstatfs)
794#define __NR_statfs 1056
795__SYSCALL(__NR_statfs, sys_statfs)
796#define __NR_lseek 1057
797__SYSCALL(__NR_lseek, sys_lseek)
798#define __NR_mmap 1058
799__SYSCALL(__NR_mmap, sys_mmap)
800
801#undef __NR_syscalls
802#define __NR_syscalls (__NR_mmap+1)
803#endif /* 32 bit off_t syscalls */
804
805#ifdef __ARCH_WANT_SYSCALL_DEPRECATED
806#define __NR_alarm 1059
807#define __ARCH_WANT_SYS_ALARM
808__SYSCALL(__NR_alarm, sys_alarm)
809#define __NR_getpgrp 1060
810#define __ARCH_WANT_SYS_GETPGRP
811__SYSCALL(__NR_getpgrp, sys_getpgrp)
812#define __NR_pause 1061
813#define __ARCH_WANT_SYS_PAUSE
814__SYSCALL(__NR_pause, sys_pause)
815#define __NR_time 1062
816#define __ARCH_WANT_SYS_TIME
817#define __ARCH_WANT_COMPAT_SYS_TIME
818__SYSCALL(__NR_time, sys_time)
819#define __NR_utime 1063
820#define __ARCH_WANT_SYS_UTIME
821__SYSCALL(__NR_utime, sys_utime)
822
823#define __NR_creat 1064
824__SYSCALL(__NR_creat, sys_creat)
825#define __NR_getdents 1065
826#define __ARCH_WANT_SYS_GETDENTS
827__SYSCALL(__NR_getdents, sys_getdents)
828#define __NR_futimesat 1066
829__SYSCALL(__NR_futimesat, sys_futimesat)
830#define __NR_select 1067
831#define __ARCH_WANT_SYS_SELECT
832__SYSCALL(__NR_select, sys_select)
833#define __NR_poll 1068
834__SYSCALL(__NR_poll, sys_poll)
835#define __NR_epoll_wait 1069
836__SYSCALL(__NR_epoll_wait, sys_epoll_wait)
837#define __NR_ustat 1070
838__SYSCALL(__NR_ustat, sys_ustat)
839#define __NR_vfork 1071
840__SYSCALL(__NR_vfork, sys_vfork)
841#define __NR_oldwait4 1072
842__SYSCALL(__NR_oldwait4, sys_wait4)
843#define __NR_recv 1073
844__SYSCALL(__NR_recv, sys_recv)
845#define __NR_send 1074
846__SYSCALL(__NR_send, sys_send)
847#define __NR_bdflush 1075
848__SYSCALL(__NR_bdflush, sys_bdflush)
849#define __NR_umount 1076
850__SYSCALL(__NR_umount, sys_oldumount)
851#define __ARCH_WANT_SYS_OLDUMOUNT
852#define __NR_uselib 1077
853__SYSCALL(__NR_uselib, sys_uselib)
854#define __NR__sysctl 1078
855__SYSCALL(__NR__sysctl, sys_sysctl)
856
857#define __NR_fork 1079
858#ifdef CONFIG_MMU
859__SYSCALL(__NR_fork, sys_fork)
860#else
861__SYSCALL(__NR_fork, sys_ni_syscall)
862#endif /* CONFIG_MMU */
863
864#undef __NR_syscalls
865#define __NR_syscalls (__NR_fork+1)
866
867#endif /* __ARCH_WANT_SYSCALL_DEPRECATED */
868
869/*
870 * 32 bit systems traditionally used different
871 * syscalls for off_t and loff_t arguments, while
872 * 64 bit systems only need the off_t version.
873 * For new 32 bit platforms, there is no need to
874 * implement the old 32 bit off_t syscalls, so
875 * they take different names.
876 * Here we map the numbers so that both versions
877 * use the same syscall table layout.
878 */
879#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
880#define __NR_fcntl __NR3264_fcntl
881#define __NR_statfs __NR3264_statfs
882#define __NR_fstatfs __NR3264_fstatfs
883#define __NR_truncate __NR3264_truncate
884#define __NR_ftruncate __NR3264_ftruncate
885#define __NR_lseek __NR3264_lseek
886#define __NR_sendfile __NR3264_sendfile
887#define __NR_newfstatat __NR3264_fstatat
888#define __NR_fstat __NR3264_fstat
889#define __NR_mmap __NR3264_mmap
890#define __NR_fadvise64 __NR3264_fadvise64
891#ifdef __NR3264_stat
892#define __NR_stat __NR3264_stat
893#define __NR_lstat __NR3264_lstat
894#endif
895#else
896#define __NR_fcntl64 __NR3264_fcntl
897#define __NR_statfs64 __NR3264_statfs
898#define __NR_fstatfs64 __NR3264_fstatfs
899#define __NR_truncate64 __NR3264_truncate
900#define __NR_ftruncate64 __NR3264_ftruncate
901#define __NR_llseek __NR3264_lseek
902#define __NR_sendfile64 __NR3264_sendfile
903#define __NR_fstatat64 __NR3264_fstatat
904#define __NR_fstat64 __NR3264_fstat
905#define __NR_mmap2 __NR3264_mmap
906#define __NR_fadvise64_64 __NR3264_fadvise64
907#ifdef __NR3264_stat
908#define __NR_stat64 __NR3264_stat
909#define __NR_lstat64 __NR3264_lstat
910#endif
911#endif