aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/Makefile3
-rw-r--r--arch/parisc/include/asm/Kbuild3
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild2
-rw-r--r--arch/parisc/include/uapi/asm/unistd.h369
-rw-r--r--arch/parisc/kernel/syscall.S11
-rw-r--r--arch/parisc/kernel/syscall_table.S459
6 files changed, 20 insertions, 827 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 1085385e1f06..c19af26febe6 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -163,3 +163,6 @@ define archhelp
163 @echo ' copy to $$(INSTALL_PATH)' 163 @echo ' copy to $$(INSTALL_PATH)'
164 @echo ' zinstall - Install compressed vmlinuz kernel' 164 @echo ' zinstall - Install compressed vmlinuz kernel'
165endef 165endef
166
167archheaders:
168 $(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 2013d639e735..0b1e354c8c24 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -1,3 +1,6 @@
1generated-y += syscall_table_32.h
2generated-y += syscall_table_64.h
3generated-y += syscall_table_c32.h
1generic-y += barrier.h 4generic-y += barrier.h
2generic-y += current.h 5generic-y += current.h
3generic-y += device.h 6generic-y += device.h
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index adb5c64831c7..d31b4261cafc 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generated-y += unistd_32.h
5generated-y += unistd_64.h
4generic-y += auxvec.h 6generic-y += auxvec.h
5generic-y += bpf_perf_event.h 7generic-y += bpf_perf_event.h
6generic-y += kvm_para.h 8generic-y += kvm_para.h
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index 63e9aae72792..98dc953656af 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -2,371 +2,10 @@
2#ifndef _UAPI_ASM_PARISC_UNISTD_H_ 2#ifndef _UAPI_ASM_PARISC_UNISTD_H_
3#define _UAPI_ASM_PARISC_UNISTD_H_ 3#define _UAPI_ASM_PARISC_UNISTD_H_
4 4
5/* 5#ifdef __LP64__
6 * Linux system call numbers. 6#include <asm/unistd_64.h>
7 * 7#else
8 * Cary Coutant says that we should just use another syscall gateway 8#include <asm/unistd_32.h>
9 * page to avoid clashing with the HPUX space, and I think he's right:
10 * it will would keep a branch out of our syscall entry path, at the
11 * very least. If we decide to change it later, we can ``just'' tweak
12 * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
13 * 1024 or something. Oh, and recompile libc. =)
14 */
15
16#define __NR_restart_syscall 0
17#define __NR_exit 1
18#define __NR_fork 2
19#define __NR_read 3
20#define __NR_write 4
21#define __NR_open 5
22#define __NR_close 6
23#define __NR_waitpid 7
24#define __NR_creat 8
25#define __NR_link 9
26#define __NR_unlink 10
27#define __NR_execve 11
28#define __NR_chdir 12
29#define __NR_time 13
30#define __NR_mknod 14
31#define __NR_chmod 15
32#define __NR_lchown 16
33#define __NR_socket 17
34#define __NR_stat 18
35#define __NR_lseek 19
36#define __NR_getpid 20
37#define __NR_mount 21
38#define __NR_bind 22
39#define __NR_setuid 23
40#define __NR_getuid 24
41#define __NR_stime 25
42#define __NR_ptrace 26
43#define __NR_alarm 27
44#define __NR_fstat 28
45#define __NR_pause 29
46#define __NR_utime 30
47#define __NR_connect 31
48#define __NR_listen 32
49#define __NR_access 33
50#define __NR_nice 34
51#define __NR_accept 35
52#define __NR_sync 36
53#define __NR_kill 37
54#define __NR_rename 38
55#define __NR_mkdir 39
56#define __NR_rmdir 40
57#define __NR_dup 41
58#define __NR_pipe 42
59#define __NR_times 43
60#define __NR_getsockname 44
61#define __NR_brk 45
62#define __NR_setgid 46
63#define __NR_getgid 47
64#define __NR_signal 48
65#define __NR_geteuid 49
66#define __NR_getegid 50
67#define __NR_acct 51
68#define __NR_umount2 52
69#define __NR_getpeername 53
70#define __NR_ioctl 54
71#define __NR_fcntl 55
72#define __NR_socketpair 56
73#define __NR_setpgid 57
74#define __NR_send 58
75#define __NR_uname 59
76#define __NR_umask 60
77#define __NR_chroot 61
78#define __NR_ustat 62
79#define __NR_dup2 63
80#define __NR_getppid 64
81#define __NR_getpgrp 65
82#define __NR_setsid 66
83#define __NR_pivot_root 67
84#define __NR_sgetmask 68
85#define __NR_ssetmask 69
86#define __NR_setreuid 70
87#define __NR_setregid 71
88#define __NR_mincore 72
89#define __NR_sigpending 73
90#define __NR_sethostname 74
91#define __NR_setrlimit 75
92#define __NR_getrlimit 76
93#define __NR_getrusage 77
94#define __NR_gettimeofday 78
95#define __NR_settimeofday 79
96#define __NR_getgroups 80
97#define __NR_setgroups 81
98#define __NR_sendto 82
99#define __NR_symlink 83
100#define __NR_lstat 84
101#define __NR_readlink 85
102#define __NR_uselib 86
103#define __NR_swapon 87
104#define __NR_reboot 88
105#define __NR_mmap2 89
106#define __NR_mmap 90
107#define __NR_munmap 91
108#define __NR_truncate 92
109#define __NR_ftruncate 93
110#define __NR_fchmod 94
111#define __NR_fchown 95
112#define __NR_getpriority 96
113#define __NR_setpriority 97
114#define __NR_recv 98
115#define __NR_statfs 99
116#define __NR_fstatfs 100
117#define __NR_stat64 101
118/* #define __NR_socketcall 102 */
119#define __NR_syslog 103
120#define __NR_setitimer 104
121#define __NR_getitimer 105
122#define __NR_capget 106
123#define __NR_capset 107
124#define __NR_pread64 108
125#define __NR_pwrite64 109
126#define __NR_getcwd 110
127#define __NR_vhangup 111
128#define __NR_fstat64 112
129#define __NR_vfork 113
130#define __NR_wait4 114
131#define __NR_swapoff 115
132#define __NR_sysinfo 116
133#define __NR_shutdown 117
134#define __NR_fsync 118
135#define __NR_madvise 119
136#define __NR_clone 120
137#define __NR_setdomainname 121
138#define __NR_sendfile 122
139#define __NR_recvfrom 123
140#define __NR_adjtimex 124
141#define __NR_mprotect 125
142#define __NR_sigprocmask 126
143#define __NR_create_module 127 /* not used */
144#define __NR_init_module 128
145#define __NR_delete_module 129
146#define __NR_get_kernel_syms 130 /* not used */
147#define __NR_quotactl 131
148#define __NR_getpgid 132
149#define __NR_fchdir 133
150#define __NR_bdflush 134
151#define __NR_sysfs 135
152#define __NR_personality 136
153#define __NR_afs_syscall 137 /* not used */
154#define __NR_setfsuid 138
155#define __NR_setfsgid 139
156#define __NR__llseek 140
157#define __NR_getdents 141
158#define __NR__newselect 142
159#define __NR_flock 143
160#define __NR_msync 144
161#define __NR_readv 145
162#define __NR_writev 146
163#define __NR_getsid 147
164#define __NR_fdatasync 148
165#define __NR__sysctl 149
166#define __NR_mlock 150
167#define __NR_munlock 151
168#define __NR_mlockall 152
169#define __NR_munlockall 153
170#define __NR_sched_setparam 154
171#define __NR_sched_getparam 155
172#define __NR_sched_setscheduler 156
173#define __NR_sched_getscheduler 157
174#define __NR_sched_yield 158
175#define __NR_sched_get_priority_max 159
176#define __NR_sched_get_priority_min 160
177#define __NR_sched_rr_get_interval 161
178#define __NR_nanosleep 162
179#define __NR_mremap 163
180#define __NR_setresuid 164
181#define __NR_getresuid 165
182#define __NR_sigaltstack 166
183#define __NR_query_module 167 /* not used */
184#define __NR_poll 168
185#define __NR_nfsservctl 169 /* not used */
186#define __NR_setresgid 170
187#define __NR_getresgid 171
188#define __NR_prctl 172
189#define __NR_rt_sigreturn 173
190#define __NR_rt_sigaction 174
191#define __NR_rt_sigprocmask 175
192#define __NR_rt_sigpending 176
193#define __NR_rt_sigtimedwait 177
194#define __NR_rt_sigqueueinfo 178
195#define __NR_rt_sigsuspend 179
196#define __NR_chown 180
197#define __NR_setsockopt 181
198#define __NR_getsockopt 182
199#define __NR_sendmsg 183
200#define __NR_recvmsg 184
201#define __NR_semop 185
202#define __NR_semget 186
203#define __NR_semctl 187
204#define __NR_msgsnd 188
205#define __NR_msgrcv 189
206#define __NR_msgget 190
207#define __NR_msgctl 191
208#define __NR_shmat 192
209#define __NR_shmdt 193
210#define __NR_shmget 194
211#define __NR_shmctl 195
212#define __NR_getpmsg 196 /* not used */
213#define __NR_putpmsg 197 /* not used */
214#define __NR_lstat64 198
215#define __NR_truncate64 199
216#define __NR_ftruncate64 200
217#define __NR_getdents64 201
218#define __NR_fcntl64 202
219#define __NR_attrctl 203 /* not used */
220#define __NR_acl_get 204 /* not used */
221#define __NR_acl_set 205 /* not used */
222#define __NR_gettid 206
223#define __NR_readahead 207
224#define __NR_tkill 208
225#define __NR_sendfile64 209
226#define __NR_futex 210
227#define __NR_sched_setaffinity 211
228#define __NR_sched_getaffinity 212
229#define __NR_set_thread_area 213 /* not used */
230#define __NR_get_thread_area 214 /* not used */
231#define __NR_io_setup 215
232#define __NR_io_destroy 216
233#define __NR_io_getevents 217
234#define __NR_io_submit 218
235#define __NR_io_cancel 219
236#define __NR_alloc_hugepages 220 /* not used */
237#define __NR_free_hugepages 221 /* not used */
238#define __NR_exit_group 222
239#define __NR_lookup_dcookie 223
240#define __NR_epoll_create 224
241#define __NR_epoll_ctl 225
242#define __NR_epoll_wait 226
243#define __NR_remap_file_pages 227
244#define __NR_semtimedop 228
245#define __NR_mq_open 229
246#define __NR_mq_unlink 230
247#define __NR_mq_timedsend 231
248#define __NR_mq_timedreceive 232
249#define __NR_mq_notify 233
250#define __NR_mq_getsetattr 234
251#define __NR_waitid 235
252#define __NR_fadvise64_64 236
253#define __NR_set_tid_address 237
254#define __NR_setxattr 238
255#define __NR_lsetxattr 239
256#define __NR_fsetxattr 240
257#define __NR_getxattr 241
258#define __NR_lgetxattr 242
259#define __NR_fgetxattr 243
260#define __NR_listxattr 244
261#define __NR_llistxattr 245
262#define __NR_flistxattr 246
263#define __NR_removexattr 247
264#define __NR_lremovexattr 248
265#define __NR_fremovexattr 249
266#define __NR_timer_create 250
267#define __NR_timer_settime 251
268#define __NR_timer_gettime 252
269#define __NR_timer_getoverrun 253
270#define __NR_timer_delete 254
271#define __NR_clock_settime 255
272#define __NR_clock_gettime 256
273#define __NR_clock_getres 257
274#define __NR_clock_nanosleep 258
275#define __NR_tgkill 259
276#define __NR_mbind 260
277#define __NR_get_mempolicy 261
278#define __NR_set_mempolicy 262
279#define __NR_vserver 263 /* not used */
280#define __NR_add_key 264
281#define __NR_request_key 265
282#define __NR_keyctl 266
283#define __NR_ioprio_set 267
284#define __NR_ioprio_get 268
285#define __NR_inotify_init 269
286#define __NR_inotify_add_watch 270
287#define __NR_inotify_rm_watch 271
288#define __NR_migrate_pages 272
289#define __NR_pselect6 273
290#define __NR_ppoll 274
291#define __NR_openat 275
292#define __NR_mkdirat 276
293#define __NR_mknodat 277
294#define __NR_fchownat 278
295#define __NR_futimesat 279
296#define __NR_fstatat64 280
297#define __NR_unlinkat 281
298#define __NR_renameat 282
299#define __NR_linkat 283
300#define __NR_symlinkat 284
301#define __NR_readlinkat 285
302#define __NR_fchmodat 286
303#define __NR_faccessat 287
304#define __NR_unshare 288
305#define __NR_set_robust_list 289
306#define __NR_get_robust_list 290
307#define __NR_splice 291
308#define __NR_sync_file_range 292
309#define __NR_tee 293
310#define __NR_vmsplice 294
311#define __NR_move_pages 295
312#define __NR_getcpu 296
313#define __NR_epoll_pwait 297
314#define __NR_statfs64 298
315#define __NR_fstatfs64 299
316#define __NR_kexec_load 300
317#define __NR_utimensat 301
318#define __NR_signalfd 302
319#define __NR_timerfd 303 /* not used */
320#define __NR_eventfd 304
321#define __NR_fallocate 305
322#define __NR_timerfd_create 306
323#define __NR_timerfd_settime 307
324#define __NR_timerfd_gettime 308
325#define __NR_signalfd4 309
326#define __NR_eventfd2 310
327#define __NR_epoll_create1 311
328#define __NR_dup3 312
329#define __NR_pipe2 313
330#define __NR_inotify_init1 314
331#define __NR_preadv 315
332#define __NR_pwritev 316
333#define __NR_rt_tgsigqueueinfo 317
334#define __NR_perf_event_open 318
335#define __NR_recvmmsg 319
336#define __NR_accept4 320
337#define __NR_prlimit64 321
338#define __NR_fanotify_init 322
339#define __NR_fanotify_mark 323
340#define __NR_clock_adjtime 324
341#define __NR_name_to_handle_at 325
342#define __NR_open_by_handle_at 326
343#define __NR_syncfs 327
344#define __NR_setns 328
345#define __NR_sendmmsg 329
346#define __NR_process_vm_readv 330
347#define __NR_process_vm_writev 331
348#define __NR_kcmp 332
349#define __NR_finit_module 333
350#define __NR_sched_setattr 334
351#define __NR_sched_getattr 335
352#define __NR_utimes 336
353#define __NR_renameat2 337
354#define __NR_seccomp 338
355#define __NR_getrandom 339
356#define __NR_memfd_create 340
357#define __NR_bpf 341
358#define __NR_execveat 342
359#define __NR_membarrier 343
360#define __NR_userfaultfd 344
361#define __NR_mlock2 345
362#define __NR_copy_file_range 346
363#define __NR_preadv2 347
364#define __NR_pwritev2 348
365#define __NR_statx 349
366#define __NR_io_pgetevents 350
367
368#ifdef __KERNEL__
369#define __NR_syscalls 351
370#endif 9#endif
371 10
372#define LINUX_GATEWAY_ADDR 0x100 11#define LINUX_GATEWAY_ADDR 0x100
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index a9bc90dc4ae7..4f77bd9be66b 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -923,19 +923,24 @@ ENTRY(lws_table)
923END(lws_table) 923END(lws_table)
924 /* End of lws table */ 924 /* End of lws table */
925 925
926#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
926 .align 8 927 .align 8
927ENTRY(sys_call_table) 928ENTRY(sys_call_table)
928 .export sys_call_table,data 929 .export sys_call_table,data
929#include "syscall_table.S" 930#ifdef CONFIG_64BIT
931#include <asm/syscall_table_c32.h> /* Compat syscalls */
932#else
933#include <asm/syscall_table_32.h> /* 32-bit native syscalls */
934#endif
930END(sys_call_table) 935END(sys_call_table)
931 936
932#ifdef CONFIG_64BIT 937#ifdef CONFIG_64BIT
933 .align 8 938 .align 8
934ENTRY(sys_call_table64) 939ENTRY(sys_call_table64)
935#define SYSCALL_TABLE_64BIT 940#include <asm/syscall_table_64.h> /* 64-bit native syscalls */
936#include "syscall_table.S"
937END(sys_call_table64) 941END(sys_call_table64)
938#endif 942#endif
943#undef __SYSCALL
939 944
940 /* 945 /*
941 All light-weight-syscall atomic operations 946 All light-weight-syscall atomic operations
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
deleted file mode 100644
index fe3f2a49d2b1..000000000000
--- a/arch/parisc/kernel/syscall_table.S
+++ /dev/null
@@ -1,459 +0,0 @@
1/* System Call Table
2 *
3 * Copyright (C) 1999-2004 Matthew Wilcox <willy at parisc-linux.org>
4 * Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
5 * Copyright (C) 2000 Alan Modra <amodra at parisc-linux.org>
6 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
7 * Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
8 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
9 * Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
10 * Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
11 * Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
12 * Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
13 * Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
14 * Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
15 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
16 * Copyright (C) 2005-2006 Kyle McMartin <kyle at parisc-linux.org>
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 */
32
33#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
34/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
35 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
36 * implementation is required on wide palinux. Use ENTRY_COMP where
37 * the compatibility layer has a useful 32-bit implementation.
38 */
39#define ENTRY_SAME(_name_) .dword sys_##_name_
40#define ENTRY_DIFF(_name_) .dword sys32_##_name_
41#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
42#define ENTRY_OURS(_name_) .dword parisc_##_name_
43#define ENTRY_COMP(_name_) .dword compat_sys_##_name_
44#elif defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
45#define ENTRY_SAME(_name_) .dword sys_##_name_
46#define ENTRY_DIFF(_name_) .dword sys_##_name_
47#define ENTRY_UHOH(_name_) .dword sys_##_name_
48#define ENTRY_OURS(_name_) .dword sys_##_name_
49#define ENTRY_COMP(_name_) .dword sys_##_name_
50#else
51#define ENTRY_SAME(_name_) .word sys_##_name_
52#define ENTRY_DIFF(_name_) .word sys_##_name_
53#define ENTRY_UHOH(_name_) .word sys_##_name_
54#define ENTRY_OURS(_name_) .word parisc_##_name_
55#define ENTRY_COMP(_name_) .word sys_##_name_
56#endif
57
5890: ENTRY_SAME(restart_syscall) /* 0 */
5991: ENTRY_SAME(exit)
60 ENTRY_SAME(fork_wrapper)
61 ENTRY_SAME(read)
62 ENTRY_SAME(write)
63 ENTRY_COMP(open) /* 5 */
64 ENTRY_SAME(close)
65 ENTRY_SAME(waitpid)
66 ENTRY_SAME(creat)
67 ENTRY_SAME(link)
68 ENTRY_SAME(unlink) /* 10 */
69 ENTRY_COMP(execve)
70 ENTRY_SAME(chdir)
71 /* See comments in kernel/time.c!!! Maybe we don't need this? */
72 ENTRY_COMP(time)
73 ENTRY_SAME(mknod)
74 ENTRY_SAME(chmod) /* 15 */
75 ENTRY_SAME(lchown)
76 ENTRY_SAME(socket)
77 /* struct stat is MAYBE identical wide and narrow ?? */
78 ENTRY_COMP(newstat)
79 ENTRY_COMP(lseek)
80 ENTRY_SAME(getpid) /* 20 */
81 /* the 'void * data' parameter may need re-packing in wide */
82 ENTRY_COMP(mount)
83 /* concerned about struct sockaddr in wide/narrow */
84 /* ---> I think sockaddr is OK unless the compiler packs the struct */
85 /* differently to align the char array */
86 ENTRY_SAME(bind)
87 ENTRY_SAME(setuid)
88 ENTRY_SAME(getuid)
89 ENTRY_COMP(stime) /* 25 */
90 ENTRY_COMP(ptrace)
91 ENTRY_SAME(alarm)
92 /* see stat comment */
93 ENTRY_COMP(newfstat)
94 ENTRY_SAME(pause)
95 /* struct utimbuf uses time_t which might vary */
96 ENTRY_COMP(utime) /* 30 */
97 /* struct sockaddr... */
98 ENTRY_SAME(connect)
99 ENTRY_SAME(listen)
100 ENTRY_SAME(access)
101 ENTRY_SAME(nice)
102 /* struct sockaddr... */
103 ENTRY_SAME(accept) /* 35 */
104 ENTRY_SAME(sync)
105 ENTRY_SAME(kill)
106 ENTRY_SAME(rename)
107 ENTRY_SAME(mkdir)
108 ENTRY_SAME(rmdir) /* 40 */
109 ENTRY_SAME(dup)
110 ENTRY_SAME(pipe)
111 ENTRY_COMP(times)
112 /* struct sockaddr... */
113 ENTRY_SAME(getsockname)
114 /* it seems possible brk() could return a >4G pointer... */
115 ENTRY_SAME(brk) /* 45 */
116 ENTRY_SAME(setgid)
117 ENTRY_SAME(getgid)
118 ENTRY_SAME(signal)
119 ENTRY_SAME(geteuid)
120 ENTRY_SAME(getegid) /* 50 */
121 ENTRY_SAME(acct)
122 ENTRY_SAME(umount)
123 /* struct sockaddr... */
124 ENTRY_SAME(getpeername)
125 ENTRY_COMP(ioctl)
126 ENTRY_COMP(fcntl) /* 55 */
127 ENTRY_SAME(socketpair)
128 ENTRY_SAME(setpgid)
129 ENTRY_SAME(send)
130 ENTRY_SAME(newuname)
131 ENTRY_SAME(umask) /* 60 */
132 ENTRY_SAME(chroot)
133 ENTRY_COMP(ustat)
134 ENTRY_SAME(dup2)
135 ENTRY_SAME(getppid)
136 ENTRY_SAME(getpgrp) /* 65 */
137 ENTRY_SAME(setsid)
138 ENTRY_SAME(pivot_root)
139 /* I don't like this */
140 ENTRY_UHOH(sgetmask)
141 ENTRY_UHOH(ssetmask)
142 ENTRY_SAME(setreuid) /* 70 */
143 ENTRY_SAME(setregid)
144 ENTRY_SAME(mincore)
145 ENTRY_COMP(sigpending)
146 ENTRY_SAME(sethostname)
147 /* Following 3 have linux-common-code structs containing longs -( */
148 ENTRY_COMP(setrlimit) /* 75 */
149 ENTRY_COMP(getrlimit)
150 ENTRY_COMP(getrusage)
151 /* struct timeval and timezone are maybe?? consistent wide and narrow */
152 ENTRY_COMP(gettimeofday)
153 ENTRY_COMP(settimeofday)
154 ENTRY_SAME(getgroups) /* 80 */
155 ENTRY_SAME(setgroups)
156 /* struct socketaddr... */
157 ENTRY_SAME(sendto)
158 ENTRY_SAME(symlink)
159 /* see stat comment */
160 ENTRY_COMP(newlstat)
161 ENTRY_SAME(readlink) /* 85 */
162 ENTRY_SAME(ni_syscall) /* was uselib */
163 ENTRY_SAME(swapon)
164 ENTRY_SAME(reboot)
165 ENTRY_SAME(mmap2)
166 ENTRY_SAME(mmap) /* 90 */
167 ENTRY_SAME(munmap)
168 ENTRY_COMP(truncate)
169 ENTRY_COMP(ftruncate)
170 ENTRY_SAME(fchmod)
171 ENTRY_SAME(fchown) /* 95 */
172 ENTRY_SAME(getpriority)
173 ENTRY_SAME(setpriority)
174 ENTRY_SAME(recv)
175 ENTRY_COMP(statfs)
176 ENTRY_COMP(fstatfs) /* 100 */
177 ENTRY_SAME(stat64)
178 ENTRY_SAME(ni_syscall) /* was socketcall */
179 ENTRY_SAME(syslog)
180 /* even though manpage says struct timeval contains longs, ours has
181 * time_t and suseconds_t -- both of which are safe wide/narrow */
182 ENTRY_COMP(setitimer)
183 ENTRY_COMP(getitimer) /* 105 */
184 ENTRY_SAME(capget)
185 ENTRY_SAME(capset)
186 ENTRY_OURS(pread64)
187 ENTRY_OURS(pwrite64)
188 ENTRY_SAME(getcwd) /* 110 */
189 ENTRY_SAME(vhangup)
190 ENTRY_SAME(fstat64)
191 ENTRY_SAME(vfork_wrapper)
192 /* struct rusage contains longs... */
193 ENTRY_COMP(wait4)
194 ENTRY_SAME(swapoff) /* 115 */
195 ENTRY_COMP(sysinfo)
196 ENTRY_SAME(shutdown)
197 ENTRY_SAME(fsync)
198 ENTRY_SAME(madvise)
199 ENTRY_SAME(clone_wrapper) /* 120 */
200 ENTRY_SAME(setdomainname)
201 ENTRY_COMP(sendfile)
202 /* struct sockaddr... */
203 ENTRY_SAME(recvfrom)
204 /* struct timex contains longs */
205 ENTRY_COMP(adjtimex)
206 ENTRY_SAME(mprotect) /* 125 */
207 /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
208 ENTRY_COMP(sigprocmask)
209 ENTRY_SAME(ni_syscall) /* create_module */
210 ENTRY_SAME(init_module)
211 ENTRY_SAME(delete_module)
212 ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */
213 /* time_t inside struct dqblk */
214 ENTRY_SAME(quotactl)
215 ENTRY_SAME(getpgid)
216 ENTRY_SAME(fchdir)
217 ENTRY_SAME(bdflush)
218 ENTRY_SAME(sysfs) /* 135 */
219 ENTRY_OURS(personality)
220 ENTRY_SAME(ni_syscall) /* for afs_syscall */
221 ENTRY_SAME(setfsuid)
222 ENTRY_SAME(setfsgid)
223 /* I think this might work */
224 ENTRY_SAME(llseek) /* 140 */
225 ENTRY_COMP(getdents)
226 /* it is POSSIBLE that select will be OK because even though fd_set
227 * contains longs, the macros and sizes are clever. */
228 ENTRY_COMP(select)
229 ENTRY_SAME(flock)
230 ENTRY_SAME(msync)
231 /* struct iovec contains pointers */
232 ENTRY_COMP(readv) /* 145 */
233 ENTRY_COMP(writev)
234 ENTRY_SAME(getsid)
235 ENTRY_SAME(fdatasync)
236 /* struct __sysctl_args is a mess */
237 ENTRY_COMP(sysctl)
238 ENTRY_SAME(mlock) /* 150 */
239 ENTRY_SAME(munlock)
240 ENTRY_SAME(mlockall)
241 ENTRY_SAME(munlockall)
242 /* struct sched_param is ok for now */
243 ENTRY_SAME(sched_setparam)
244 ENTRY_SAME(sched_getparam) /* 155 */
245 ENTRY_SAME(sched_setscheduler)
246 ENTRY_SAME(sched_getscheduler)
247 ENTRY_SAME(sched_yield)
248 ENTRY_SAME(sched_get_priority_max)
249 ENTRY_SAME(sched_get_priority_min) /* 160 */
250 ENTRY_COMP(sched_rr_get_interval)
251 ENTRY_COMP(nanosleep)
252 ENTRY_SAME(mremap)
253 ENTRY_SAME(setresuid)
254 ENTRY_SAME(getresuid) /* 165 */
255 ENTRY_COMP(sigaltstack)
256 ENTRY_SAME(ni_syscall) /* query_module */
257 ENTRY_SAME(poll)
258 /* structs contain pointers and an in_addr... */
259 ENTRY_SAME(ni_syscall) /* was nfsservctl */
260 ENTRY_SAME(setresgid) /* 170 */
261 ENTRY_SAME(getresgid)
262 ENTRY_SAME(prctl)
263 /* signals need a careful review */
264 ENTRY_SAME(rt_sigreturn_wrapper)
265 ENTRY_COMP(rt_sigaction)
266 ENTRY_COMP(rt_sigprocmask) /* 175 */
267 ENTRY_COMP(rt_sigpending)
268 ENTRY_COMP(rt_sigtimedwait)
269 /* even though the struct siginfo_t is different, it appears like
270 * all the paths use values which should be same wide and narrow.
271 * Also the struct is padded to 128 bytes which means we don't have
272 * to worry about faulting trying to copy in a larger 64-bit
273 * struct from a 32-bit user-space app.
274 */
275 ENTRY_COMP(rt_sigqueueinfo)
276 ENTRY_COMP(rt_sigsuspend)
277 ENTRY_SAME(chown) /* 180 */
278 /* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */
279 ENTRY_COMP(setsockopt)
280 ENTRY_COMP(getsockopt)
281 ENTRY_COMP(sendmsg)
282 ENTRY_COMP(recvmsg)
283 ENTRY_SAME(semop) /* 185 */
284 ENTRY_SAME(semget)
285 ENTRY_COMP(semctl)
286 ENTRY_COMP(msgsnd)
287 ENTRY_COMP(msgrcv)
288 ENTRY_SAME(msgget) /* 190 */
289 ENTRY_COMP(msgctl)
290 ENTRY_COMP(shmat)
291 ENTRY_SAME(shmdt)
292 ENTRY_SAME(shmget)
293 ENTRY_COMP(shmctl) /* 195 */
294 ENTRY_SAME(ni_syscall) /* streams1 */
295 ENTRY_SAME(ni_syscall) /* streams2 */
296 ENTRY_SAME(lstat64)
297 ENTRY_OURS(truncate64)
298 ENTRY_OURS(ftruncate64) /* 200 */
299 ENTRY_SAME(getdents64)
300 ENTRY_COMP(fcntl64)
301 ENTRY_SAME(ni_syscall) /* attrctl -- dead */
302 ENTRY_SAME(ni_syscall) /* acl_get -- dead */
303 ENTRY_SAME(ni_syscall) /* 205 (acl_set -- dead) */
304 ENTRY_SAME(gettid)
305 ENTRY_OURS(readahead)
306 ENTRY_SAME(tkill)
307 ENTRY_COMP(sendfile64)
308 ENTRY_COMP(futex) /* 210 */
309 ENTRY_COMP(sched_setaffinity)
310 ENTRY_COMP(sched_getaffinity)
311 ENTRY_SAME(ni_syscall) /* set_thread_area */
312 ENTRY_SAME(ni_syscall) /* get_thread_area */
313 ENTRY_COMP(io_setup) /* 215 */
314 ENTRY_SAME(io_destroy)
315 ENTRY_COMP(io_getevents)
316 ENTRY_COMP(io_submit)
317 ENTRY_SAME(io_cancel)
318 ENTRY_SAME(ni_syscall) /* 220: was alloc_hugepages */
319 ENTRY_SAME(ni_syscall) /* was free_hugepages */
320 ENTRY_SAME(exit_group)
321 ENTRY_COMP(lookup_dcookie)
322 ENTRY_SAME(epoll_create)
323 ENTRY_SAME(epoll_ctl) /* 225 */
324 ENTRY_SAME(epoll_wait)
325 ENTRY_SAME(remap_file_pages)
326 ENTRY_COMP(semtimedop)
327 ENTRY_COMP(mq_open)
328 ENTRY_SAME(mq_unlink) /* 230 */
329 ENTRY_COMP(mq_timedsend)
330 ENTRY_COMP(mq_timedreceive)
331 ENTRY_COMP(mq_notify)
332 ENTRY_COMP(mq_getsetattr)
333 ENTRY_COMP(waitid) /* 235 */
334 ENTRY_OURS(fadvise64_64)
335 ENTRY_SAME(set_tid_address)
336 ENTRY_SAME(setxattr)
337 ENTRY_SAME(lsetxattr)
338 ENTRY_SAME(fsetxattr) /* 240 */
339 ENTRY_SAME(getxattr)
340 ENTRY_SAME(lgetxattr)
341 ENTRY_SAME(fgetxattr)
342 ENTRY_SAME(listxattr)
343 ENTRY_SAME(llistxattr) /* 245 */
344 ENTRY_SAME(flistxattr)
345 ENTRY_SAME(removexattr)
346 ENTRY_SAME(lremovexattr)
347 ENTRY_SAME(fremovexattr)
348 ENTRY_COMP(timer_create) /* 250 */
349 ENTRY_COMP(timer_settime)
350 ENTRY_COMP(timer_gettime)
351 ENTRY_SAME(timer_getoverrun)
352 ENTRY_SAME(timer_delete)
353 ENTRY_COMP(clock_settime) /* 255 */
354 ENTRY_COMP(clock_gettime)
355 ENTRY_COMP(clock_getres)
356 ENTRY_COMP(clock_nanosleep)
357 ENTRY_SAME(tgkill)
358 ENTRY_COMP(mbind) /* 260 */
359 ENTRY_COMP(get_mempolicy)
360 ENTRY_COMP(set_mempolicy)
361 ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */
362 ENTRY_SAME(add_key)
363 ENTRY_SAME(request_key) /* 265 */
364 ENTRY_COMP(keyctl)
365 ENTRY_SAME(ioprio_set)
366 ENTRY_SAME(ioprio_get)
367 ENTRY_SAME(inotify_init)
368 ENTRY_SAME(inotify_add_watch) /* 270 */
369 ENTRY_SAME(inotify_rm_watch)
370 ENTRY_SAME(migrate_pages)
371 ENTRY_COMP(pselect6)
372 ENTRY_COMP(ppoll)
373 ENTRY_COMP(openat) /* 275 */
374 ENTRY_SAME(mkdirat)
375 ENTRY_SAME(mknodat)
376 ENTRY_SAME(fchownat)
377 ENTRY_COMP(futimesat)
378 ENTRY_SAME(fstatat64) /* 280 */
379 ENTRY_SAME(unlinkat)
380 ENTRY_SAME(renameat)
381 ENTRY_SAME(linkat)
382 ENTRY_SAME(symlinkat)
383 ENTRY_SAME(readlinkat) /* 285 */
384 ENTRY_SAME(fchmodat)
385 ENTRY_SAME(faccessat)
386 ENTRY_SAME(unshare)
387 ENTRY_COMP(set_robust_list)
388 ENTRY_COMP(get_robust_list) /* 290 */
389 ENTRY_SAME(splice)
390 ENTRY_OURS(sync_file_range)
391 ENTRY_SAME(tee)
392 ENTRY_COMP(vmsplice)
393 ENTRY_COMP(move_pages) /* 295 */
394 ENTRY_SAME(getcpu)
395 ENTRY_COMP(epoll_pwait)
396 ENTRY_COMP(statfs64)
397 ENTRY_COMP(fstatfs64)
398 ENTRY_COMP(kexec_load) /* 300 */
399 ENTRY_COMP(utimensat)
400 ENTRY_COMP(signalfd)
401 ENTRY_SAME(ni_syscall) /* was timerfd */
402 ENTRY_SAME(eventfd)
403 ENTRY_OURS(fallocate) /* 305 */
404 ENTRY_SAME(timerfd_create)
405 ENTRY_COMP(timerfd_settime)
406 ENTRY_COMP(timerfd_gettime)
407 ENTRY_COMP(signalfd4)
408 ENTRY_SAME(eventfd2) /* 310 */
409 ENTRY_SAME(epoll_create1)
410 ENTRY_SAME(dup3)
411 ENTRY_SAME(pipe2)
412 ENTRY_SAME(inotify_init1)
413 ENTRY_COMP(preadv) /* 315 */
414 ENTRY_COMP(pwritev)
415 ENTRY_COMP(rt_tgsigqueueinfo)
416 ENTRY_SAME(perf_event_open)
417 ENTRY_COMP(recvmmsg)
418 ENTRY_SAME(accept4) /* 320 */
419 ENTRY_SAME(prlimit64)
420 ENTRY_SAME(fanotify_init)
421 ENTRY_DIFF(fanotify_mark)
422 ENTRY_COMP(clock_adjtime)
423 ENTRY_SAME(name_to_handle_at) /* 325 */
424 ENTRY_COMP(open_by_handle_at)
425 ENTRY_SAME(syncfs)
426 ENTRY_SAME(setns)
427 ENTRY_COMP(sendmmsg)
428 ENTRY_COMP(process_vm_readv) /* 330 */
429 ENTRY_COMP(process_vm_writev)
430 ENTRY_SAME(kcmp)
431 ENTRY_SAME(finit_module)
432 ENTRY_SAME(sched_setattr)
433 ENTRY_SAME(sched_getattr) /* 335 */
434 ENTRY_COMP(utimes)
435 ENTRY_SAME(renameat2)
436 ENTRY_SAME(seccomp)
437 ENTRY_SAME(getrandom)
438 ENTRY_SAME(memfd_create) /* 340 */
439 ENTRY_SAME(bpf)
440 ENTRY_COMP(execveat)
441 ENTRY_SAME(membarrier)
442 ENTRY_SAME(userfaultfd)
443 ENTRY_SAME(mlock2) /* 345 */
444 ENTRY_SAME(copy_file_range)
445 ENTRY_COMP(preadv2)
446 ENTRY_COMP(pwritev2)
447 ENTRY_SAME(statx)
448 ENTRY_COMP(io_pgetevents) /* 350 */
449
450
451.ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
452.error "size of syscall table does not fit value of __NR_Linux_syscalls"
453.endif
454
455#undef ENTRY_SAME
456#undef ENTRY_DIFF
457#undef ENTRY_UHOH
458#undef ENTRY_COMP
459#undef ENTRY_OURS