summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-10-18 14:57:01 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2016-10-18 16:34:06 -0400
commit96a8fae0fe094b6a26a3ec88b2f097418f269cfe (patch)
tree611c87ac99ac3ee4407d4d37b6c77d5274e3c2e1
parent4e2648db9c5f7b2281551694597102612f54460d (diff)
ARM: convert to generated system call tables
Convert ARM to use a similar mechanism to x86 to generate the unistd.h system call numbers and the various kernel system call tables. This means that rather than having to edit three places (asm/unistd.h for the total number of system calls, uapi/asm/unistd.h for the system call numbers, and arch/arm/kernel/calls.S for the call table) we have only one place to edit, making the process much more simple. The scripts have knowledge of the table padding requirements, so there's no need to worry about __NR_syscalls not fitting within the immediate constant field of ALU instructions anymore. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/Makefile3
-rw-r--r--arch/arm/include/asm/Kbuild1
-rw-r--r--arch/arm/include/asm/unistd.h26
-rw-r--r--arch/arm/include/uapi/asm/Kbuild3
-rw-r--r--arch/arm/include/uapi/asm/unistd.h421
-rw-r--r--arch/arm/kernel/calls.S412
-rw-r--r--arch/arm/kernel/entry-common.S76
-rw-r--r--arch/arm/tools/Makefile62
-rw-r--r--arch/arm/tools/syscall.tbl410
-rw-r--r--arch/arm/tools/syscallhdr.sh30
-rw-r--r--arch/arm/tools/syscallnr.sh33
-rw-r--r--arch/arm/tools/syscalltbl.sh21
12 files changed, 625 insertions, 873 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 2208a73ba1d4..5a26576fba9a 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -311,6 +311,9 @@ all: $(KBUILD_IMAGE) $(KBUILD_DTBS)
311 311
312boot := arch/arm/boot 312boot := arch/arm/boot
313 313
314archheaders:
315 $(Q)$(MAKE) $(build)=arch/arm/tools uapi
316
314archprepare: 317archprepare:
315 $(Q)$(MAKE) $(build)=arch/arm/tools kapi 318 $(Q)$(MAKE) $(build)=arch/arm/tools kapi
316 319
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 5b06064946ce..b7960e3956b2 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -41,3 +41,4 @@ generic-y += trace_clock.h
41generic-y += unaligned.h 41generic-y += unaligned.h
42 42
43generated-y += mach-types.h 43generated-y += mach-types.h
44generated-y += unistd-nr.h
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 194b69923389..076090d2dbf5 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -14,12 +14,7 @@
14#define __ASM_ARM_UNISTD_H 14#define __ASM_ARM_UNISTD_H
15 15
16#include <uapi/asm/unistd.h> 16#include <uapi/asm/unistd.h>
17 17#include <asm/unistd-nr.h>
18/*
19 * This may need to be greater than __NR_last_syscall+1 in order to
20 * account for the padding in the syscall table
21 */
22#define __NR_syscalls (396)
23 18
24#define __ARCH_WANT_STAT64 19#define __ARCH_WANT_STAT64
25#define __ARCH_WANT_SYS_GETHOSTNAME 20#define __ARCH_WANT_SYS_GETHOSTNAME
@@ -52,4 +47,23 @@
52#define __IGNORE_fadvise64_64 47#define __IGNORE_fadvise64_64
53#define __IGNORE_migrate_pages 48#define __IGNORE_migrate_pages
54 49
50#ifdef __ARM_EABI__
51/*
52 * The following syscalls are obsolete and no longer available for EABI:
53 * __NR_time
54 * __NR_umount
55 * __NR_stime
56 * __NR_alarm
57 * __NR_utime
58 * __NR_getrlimit
59 * __NR_select
60 * __NR_readdir
61 * __NR_mmap
62 * __NR_socketcall
63 * __NR_syscall
64 * __NR_ipc
65 */
66#define __IGNORE_getrlimit
67#endif
68
55#endif /* __ASM_ARM_UNISTD_H */ 69#endif /* __ASM_ARM_UNISTD_H */
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index a1c05f93d920..46a76cd6acb6 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -18,3 +18,6 @@ header-y += stat.h
18header-y += statfs.h 18header-y += statfs.h
19header-y += swab.h 19header-y += swab.h
20header-y += unistd.h 20header-y += unistd.h
21genhdr-y += unistd-common.h
22genhdr-y += unistd-oabi.h
23genhdr-y += unistd-eabi.h
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 2cb9dc770e1d..28bd456494a3 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -17,409 +17,14 @@
17 17
18#if defined(__thumb__) || defined(__ARM_EABI__) 18#if defined(__thumb__) || defined(__ARM_EABI__)
19#define __NR_SYSCALL_BASE 0 19#define __NR_SYSCALL_BASE 0
20#include <asm/unistd-eabi.h>
20#else 21#else
21#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE 22#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
23#include <asm/unistd-oabi.h>
22#endif 24#endif
23 25
24/* 26#include <asm/unistd-common.h>
25 * This file contains the system call numbers.
26 */
27
28#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0)
29#define __NR_exit (__NR_SYSCALL_BASE+ 1)
30#define __NR_fork (__NR_SYSCALL_BASE+ 2)
31#define __NR_read (__NR_SYSCALL_BASE+ 3)
32#define __NR_write (__NR_SYSCALL_BASE+ 4)
33#define __NR_open (__NR_SYSCALL_BASE+ 5)
34#define __NR_close (__NR_SYSCALL_BASE+ 6)
35 /* 7 was sys_waitpid */
36#define __NR_creat (__NR_SYSCALL_BASE+ 8)
37#define __NR_link (__NR_SYSCALL_BASE+ 9)
38#define __NR_unlink (__NR_SYSCALL_BASE+ 10)
39#define __NR_execve (__NR_SYSCALL_BASE+ 11)
40#define __NR_chdir (__NR_SYSCALL_BASE+ 12)
41#define __NR_time (__NR_SYSCALL_BASE+ 13)
42#define __NR_mknod (__NR_SYSCALL_BASE+ 14)
43#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
44#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
45 /* 17 was sys_break */
46 /* 18 was sys_stat */
47#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
48#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
49#define __NR_mount (__NR_SYSCALL_BASE+ 21)
50#define __NR_umount (__NR_SYSCALL_BASE+ 22)
51#define __NR_setuid (__NR_SYSCALL_BASE+ 23)
52#define __NR_getuid (__NR_SYSCALL_BASE+ 24)
53#define __NR_stime (__NR_SYSCALL_BASE+ 25)
54#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
55#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
56 /* 28 was sys_fstat */
57#define __NR_pause (__NR_SYSCALL_BASE+ 29)
58#define __NR_utime (__NR_SYSCALL_BASE+ 30)
59 /* 31 was sys_stty */
60 /* 32 was sys_gtty */
61#define __NR_access (__NR_SYSCALL_BASE+ 33)
62#define __NR_nice (__NR_SYSCALL_BASE+ 34)
63 /* 35 was sys_ftime */
64#define __NR_sync (__NR_SYSCALL_BASE+ 36)
65#define __NR_kill (__NR_SYSCALL_BASE+ 37)
66#define __NR_rename (__NR_SYSCALL_BASE+ 38)
67#define __NR_mkdir (__NR_SYSCALL_BASE+ 39)
68#define __NR_rmdir (__NR_SYSCALL_BASE+ 40)
69#define __NR_dup (__NR_SYSCALL_BASE+ 41)
70#define __NR_pipe (__NR_SYSCALL_BASE+ 42)
71#define __NR_times (__NR_SYSCALL_BASE+ 43)
72 /* 44 was sys_prof */
73#define __NR_brk (__NR_SYSCALL_BASE+ 45)
74#define __NR_setgid (__NR_SYSCALL_BASE+ 46)
75#define __NR_getgid (__NR_SYSCALL_BASE+ 47)
76 /* 48 was sys_signal */
77#define __NR_geteuid (__NR_SYSCALL_BASE+ 49)
78#define __NR_getegid (__NR_SYSCALL_BASE+ 50)
79#define __NR_acct (__NR_SYSCALL_BASE+ 51)
80#define __NR_umount2 (__NR_SYSCALL_BASE+ 52)
81 /* 53 was sys_lock */
82#define __NR_ioctl (__NR_SYSCALL_BASE+ 54)
83#define __NR_fcntl (__NR_SYSCALL_BASE+ 55)
84 /* 56 was sys_mpx */
85#define __NR_setpgid (__NR_SYSCALL_BASE+ 57)
86 /* 58 was sys_ulimit */
87 /* 59 was sys_olduname */
88#define __NR_umask (__NR_SYSCALL_BASE+ 60)
89#define __NR_chroot (__NR_SYSCALL_BASE+ 61)
90#define __NR_ustat (__NR_SYSCALL_BASE+ 62)
91#define __NR_dup2 (__NR_SYSCALL_BASE+ 63)
92#define __NR_getppid (__NR_SYSCALL_BASE+ 64)
93#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65)
94#define __NR_setsid (__NR_SYSCALL_BASE+ 66)
95#define __NR_sigaction (__NR_SYSCALL_BASE+ 67)
96 /* 68 was sys_sgetmask */
97 /* 69 was sys_ssetmask */
98#define __NR_setreuid (__NR_SYSCALL_BASE+ 70)
99#define __NR_setregid (__NR_SYSCALL_BASE+ 71)
100#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72)
101#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
102#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
103#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
104#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */
105#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
106#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
107#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
108#define __NR_getgroups (__NR_SYSCALL_BASE+ 80)
109#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
110#define __NR_select (__NR_SYSCALL_BASE+ 82)
111#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
112 /* 84 was sys_lstat */
113#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
114#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
115#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
116#define __NR_reboot (__NR_SYSCALL_BASE+ 88)
117#define __NR_readdir (__NR_SYSCALL_BASE+ 89)
118#define __NR_mmap (__NR_SYSCALL_BASE+ 90)
119#define __NR_munmap (__NR_SYSCALL_BASE+ 91)
120#define __NR_truncate (__NR_SYSCALL_BASE+ 92)
121#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93)
122#define __NR_fchmod (__NR_SYSCALL_BASE+ 94)
123#define __NR_fchown (__NR_SYSCALL_BASE+ 95)
124#define __NR_getpriority (__NR_SYSCALL_BASE+ 96)
125#define __NR_setpriority (__NR_SYSCALL_BASE+ 97)
126 /* 98 was sys_profil */
127#define __NR_statfs (__NR_SYSCALL_BASE+ 99)
128#define __NR_fstatfs (__NR_SYSCALL_BASE+100)
129 /* 101 was sys_ioperm */
130#define __NR_socketcall (__NR_SYSCALL_BASE+102)
131#define __NR_syslog (__NR_SYSCALL_BASE+103)
132#define __NR_setitimer (__NR_SYSCALL_BASE+104)
133#define __NR_getitimer (__NR_SYSCALL_BASE+105)
134#define __NR_stat (__NR_SYSCALL_BASE+106)
135#define __NR_lstat (__NR_SYSCALL_BASE+107)
136#define __NR_fstat (__NR_SYSCALL_BASE+108)
137 /* 109 was sys_uname */
138 /* 110 was sys_iopl */
139#define __NR_vhangup (__NR_SYSCALL_BASE+111)
140 /* 112 was sys_idle */
141#define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */
142#define __NR_wait4 (__NR_SYSCALL_BASE+114)
143#define __NR_swapoff (__NR_SYSCALL_BASE+115)
144#define __NR_sysinfo (__NR_SYSCALL_BASE+116)
145#define __NR_ipc (__NR_SYSCALL_BASE+117)
146#define __NR_fsync (__NR_SYSCALL_BASE+118)
147#define __NR_sigreturn (__NR_SYSCALL_BASE+119)
148#define __NR_clone (__NR_SYSCALL_BASE+120)
149#define __NR_setdomainname (__NR_SYSCALL_BASE+121)
150#define __NR_uname (__NR_SYSCALL_BASE+122)
151 /* 123 was sys_modify_ldt */
152#define __NR_adjtimex (__NR_SYSCALL_BASE+124)
153#define __NR_mprotect (__NR_SYSCALL_BASE+125)
154#define __NR_sigprocmask (__NR_SYSCALL_BASE+126)
155 /* 127 was sys_create_module */
156#define __NR_init_module (__NR_SYSCALL_BASE+128)
157#define __NR_delete_module (__NR_SYSCALL_BASE+129)
158 /* 130 was sys_get_kernel_syms */
159#define __NR_quotactl (__NR_SYSCALL_BASE+131)
160#define __NR_getpgid (__NR_SYSCALL_BASE+132)
161#define __NR_fchdir (__NR_SYSCALL_BASE+133)
162#define __NR_bdflush (__NR_SYSCALL_BASE+134)
163#define __NR_sysfs (__NR_SYSCALL_BASE+135)
164#define __NR_personality (__NR_SYSCALL_BASE+136)
165 /* 137 was sys_afs_syscall */
166#define __NR_setfsuid (__NR_SYSCALL_BASE+138)
167#define __NR_setfsgid (__NR_SYSCALL_BASE+139)
168#define __NR__llseek (__NR_SYSCALL_BASE+140)
169#define __NR_getdents (__NR_SYSCALL_BASE+141)
170#define __NR__newselect (__NR_SYSCALL_BASE+142)
171#define __NR_flock (__NR_SYSCALL_BASE+143)
172#define __NR_msync (__NR_SYSCALL_BASE+144)
173#define __NR_readv (__NR_SYSCALL_BASE+145)
174#define __NR_writev (__NR_SYSCALL_BASE+146)
175#define __NR_getsid (__NR_SYSCALL_BASE+147)
176#define __NR_fdatasync (__NR_SYSCALL_BASE+148)
177#define __NR__sysctl (__NR_SYSCALL_BASE+149)
178#define __NR_mlock (__NR_SYSCALL_BASE+150)
179#define __NR_munlock (__NR_SYSCALL_BASE+151)
180#define __NR_mlockall (__NR_SYSCALL_BASE+152)
181#define __NR_munlockall (__NR_SYSCALL_BASE+153)
182#define __NR_sched_setparam (__NR_SYSCALL_BASE+154)
183#define __NR_sched_getparam (__NR_SYSCALL_BASE+155)
184#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156)
185#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157)
186#define __NR_sched_yield (__NR_SYSCALL_BASE+158)
187#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159)
188#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160)
189#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161)
190#define __NR_nanosleep (__NR_SYSCALL_BASE+162)
191#define __NR_mremap (__NR_SYSCALL_BASE+163)
192#define __NR_setresuid (__NR_SYSCALL_BASE+164)
193#define __NR_getresuid (__NR_SYSCALL_BASE+165)
194 /* 166 was sys_vm86 */
195 /* 167 was sys_query_module */
196#define __NR_poll (__NR_SYSCALL_BASE+168)
197#define __NR_nfsservctl (__NR_SYSCALL_BASE+169)
198#define __NR_setresgid (__NR_SYSCALL_BASE+170)
199#define __NR_getresgid (__NR_SYSCALL_BASE+171)
200#define __NR_prctl (__NR_SYSCALL_BASE+172)
201#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173)
202#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174)
203#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175)
204#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176)
205#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177)
206#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178)
207#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179)
208#define __NR_pread64 (__NR_SYSCALL_BASE+180)
209#define __NR_pwrite64 (__NR_SYSCALL_BASE+181)
210#define __NR_chown (__NR_SYSCALL_BASE+182)
211#define __NR_getcwd (__NR_SYSCALL_BASE+183)
212#define __NR_capget (__NR_SYSCALL_BASE+184)
213#define __NR_capset (__NR_SYSCALL_BASE+185)
214#define __NR_sigaltstack (__NR_SYSCALL_BASE+186)
215#define __NR_sendfile (__NR_SYSCALL_BASE+187)
216 /* 188 reserved */
217 /* 189 reserved */
218#define __NR_vfork (__NR_SYSCALL_BASE+190)
219#define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */
220#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
221#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
222#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
223#define __NR_stat64 (__NR_SYSCALL_BASE+195)
224#define __NR_lstat64 (__NR_SYSCALL_BASE+196)
225#define __NR_fstat64 (__NR_SYSCALL_BASE+197)
226#define __NR_lchown32 (__NR_SYSCALL_BASE+198)
227#define __NR_getuid32 (__NR_SYSCALL_BASE+199)
228#define __NR_getgid32 (__NR_SYSCALL_BASE+200)
229#define __NR_geteuid32 (__NR_SYSCALL_BASE+201)
230#define __NR_getegid32 (__NR_SYSCALL_BASE+202)
231#define __NR_setreuid32 (__NR_SYSCALL_BASE+203)
232#define __NR_setregid32 (__NR_SYSCALL_BASE+204)
233#define __NR_getgroups32 (__NR_SYSCALL_BASE+205)
234#define __NR_setgroups32 (__NR_SYSCALL_BASE+206)
235#define __NR_fchown32 (__NR_SYSCALL_BASE+207)
236#define __NR_setresuid32 (__NR_SYSCALL_BASE+208)
237#define __NR_getresuid32 (__NR_SYSCALL_BASE+209)
238#define __NR_setresgid32 (__NR_SYSCALL_BASE+210)
239#define __NR_getresgid32 (__NR_SYSCALL_BASE+211)
240#define __NR_chown32 (__NR_SYSCALL_BASE+212)
241#define __NR_setuid32 (__NR_SYSCALL_BASE+213)
242#define __NR_setgid32 (__NR_SYSCALL_BASE+214)
243#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215)
244#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216)
245#define __NR_getdents64 (__NR_SYSCALL_BASE+217)
246#define __NR_pivot_root (__NR_SYSCALL_BASE+218)
247#define __NR_mincore (__NR_SYSCALL_BASE+219)
248#define __NR_madvise (__NR_SYSCALL_BASE+220)
249#define __NR_fcntl64 (__NR_SYSCALL_BASE+221)
250 /* 222 for tux */
251 /* 223 is unused */
252#define __NR_gettid (__NR_SYSCALL_BASE+224)
253#define __NR_readahead (__NR_SYSCALL_BASE+225)
254#define __NR_setxattr (__NR_SYSCALL_BASE+226)
255#define __NR_lsetxattr (__NR_SYSCALL_BASE+227)
256#define __NR_fsetxattr (__NR_SYSCALL_BASE+228)
257#define __NR_getxattr (__NR_SYSCALL_BASE+229)
258#define __NR_lgetxattr (__NR_SYSCALL_BASE+230)
259#define __NR_fgetxattr (__NR_SYSCALL_BASE+231)
260#define __NR_listxattr (__NR_SYSCALL_BASE+232)
261#define __NR_llistxattr (__NR_SYSCALL_BASE+233)
262#define __NR_flistxattr (__NR_SYSCALL_BASE+234)
263#define __NR_removexattr (__NR_SYSCALL_BASE+235)
264#define __NR_lremovexattr (__NR_SYSCALL_BASE+236)
265#define __NR_fremovexattr (__NR_SYSCALL_BASE+237)
266#define __NR_tkill (__NR_SYSCALL_BASE+238)
267#define __NR_sendfile64 (__NR_SYSCALL_BASE+239)
268#define __NR_futex (__NR_SYSCALL_BASE+240)
269#define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241)
270#define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242)
271#define __NR_io_setup (__NR_SYSCALL_BASE+243)
272#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
273#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
274#define __NR_io_submit (__NR_SYSCALL_BASE+246)
275#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
276#define __NR_exit_group (__NR_SYSCALL_BASE+248)
277#define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249)
278#define __NR_epoll_create (__NR_SYSCALL_BASE+250)
279#define __NR_epoll_ctl (__NR_SYSCALL_BASE+251)
280#define __NR_epoll_wait (__NR_SYSCALL_BASE+252)
281#define __NR_remap_file_pages (__NR_SYSCALL_BASE+253)
282 /* 254 for set_thread_area */
283 /* 255 for get_thread_area */
284#define __NR_set_tid_address (__NR_SYSCALL_BASE+256)
285#define __NR_timer_create (__NR_SYSCALL_BASE+257)
286#define __NR_timer_settime (__NR_SYSCALL_BASE+258)
287#define __NR_timer_gettime (__NR_SYSCALL_BASE+259)
288#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260)
289#define __NR_timer_delete (__NR_SYSCALL_BASE+261)
290#define __NR_clock_settime (__NR_SYSCALL_BASE+262)
291#define __NR_clock_gettime (__NR_SYSCALL_BASE+263)
292#define __NR_clock_getres (__NR_SYSCALL_BASE+264)
293#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265)
294#define __NR_statfs64 (__NR_SYSCALL_BASE+266)
295#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267)
296#define __NR_tgkill (__NR_SYSCALL_BASE+268)
297#define __NR_utimes (__NR_SYSCALL_BASE+269)
298#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270)
299#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271)
300#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272)
301#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273)
302#define __NR_mq_open (__NR_SYSCALL_BASE+274)
303#define __NR_mq_unlink (__NR_SYSCALL_BASE+275)
304#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276)
305#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277)
306#define __NR_mq_notify (__NR_SYSCALL_BASE+278)
307#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279)
308#define __NR_waitid (__NR_SYSCALL_BASE+280)
309#define __NR_socket (__NR_SYSCALL_BASE+281)
310#define __NR_bind (__NR_SYSCALL_BASE+282)
311#define __NR_connect (__NR_SYSCALL_BASE+283)
312#define __NR_listen (__NR_SYSCALL_BASE+284)
313#define __NR_accept (__NR_SYSCALL_BASE+285)
314#define __NR_getsockname (__NR_SYSCALL_BASE+286)
315#define __NR_getpeername (__NR_SYSCALL_BASE+287)
316#define __NR_socketpair (__NR_SYSCALL_BASE+288)
317#define __NR_send (__NR_SYSCALL_BASE+289)
318#define __NR_sendto (__NR_SYSCALL_BASE+290)
319#define __NR_recv (__NR_SYSCALL_BASE+291)
320#define __NR_recvfrom (__NR_SYSCALL_BASE+292)
321#define __NR_shutdown (__NR_SYSCALL_BASE+293)
322#define __NR_setsockopt (__NR_SYSCALL_BASE+294)
323#define __NR_getsockopt (__NR_SYSCALL_BASE+295)
324#define __NR_sendmsg (__NR_SYSCALL_BASE+296)
325#define __NR_recvmsg (__NR_SYSCALL_BASE+297)
326#define __NR_semop (__NR_SYSCALL_BASE+298)
327#define __NR_semget (__NR_SYSCALL_BASE+299)
328#define __NR_semctl (__NR_SYSCALL_BASE+300)
329#define __NR_msgsnd (__NR_SYSCALL_BASE+301)
330#define __NR_msgrcv (__NR_SYSCALL_BASE+302)
331#define __NR_msgget (__NR_SYSCALL_BASE+303)
332#define __NR_msgctl (__NR_SYSCALL_BASE+304)
333#define __NR_shmat (__NR_SYSCALL_BASE+305)
334#define __NR_shmdt (__NR_SYSCALL_BASE+306)
335#define __NR_shmget (__NR_SYSCALL_BASE+307)
336#define __NR_shmctl (__NR_SYSCALL_BASE+308)
337#define __NR_add_key (__NR_SYSCALL_BASE+309)
338#define __NR_request_key (__NR_SYSCALL_BASE+310)
339#define __NR_keyctl (__NR_SYSCALL_BASE+311)
340#define __NR_semtimedop (__NR_SYSCALL_BASE+312)
341#define __NR_vserver (__NR_SYSCALL_BASE+313)
342#define __NR_ioprio_set (__NR_SYSCALL_BASE+314)
343#define __NR_ioprio_get (__NR_SYSCALL_BASE+315)
344#define __NR_inotify_init (__NR_SYSCALL_BASE+316)
345#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317)
346#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318)
347#define __NR_mbind (__NR_SYSCALL_BASE+319)
348#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320)
349#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321)
350#define __NR_openat (__NR_SYSCALL_BASE+322)
351#define __NR_mkdirat (__NR_SYSCALL_BASE+323)
352#define __NR_mknodat (__NR_SYSCALL_BASE+324)
353#define __NR_fchownat (__NR_SYSCALL_BASE+325)
354#define __NR_futimesat (__NR_SYSCALL_BASE+326)
355#define __NR_fstatat64 (__NR_SYSCALL_BASE+327)
356#define __NR_unlinkat (__NR_SYSCALL_BASE+328)
357#define __NR_renameat (__NR_SYSCALL_BASE+329)
358#define __NR_linkat (__NR_SYSCALL_BASE+330)
359#define __NR_symlinkat (__NR_SYSCALL_BASE+331)
360#define __NR_readlinkat (__NR_SYSCALL_BASE+332)
361#define __NR_fchmodat (__NR_SYSCALL_BASE+333)
362#define __NR_faccessat (__NR_SYSCALL_BASE+334)
363#define __NR_pselect6 (__NR_SYSCALL_BASE+335)
364#define __NR_ppoll (__NR_SYSCALL_BASE+336)
365#define __NR_unshare (__NR_SYSCALL_BASE+337)
366#define __NR_set_robust_list (__NR_SYSCALL_BASE+338)
367#define __NR_get_robust_list (__NR_SYSCALL_BASE+339)
368#define __NR_splice (__NR_SYSCALL_BASE+340)
369#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341)
370#define __NR_sync_file_range2 __NR_arm_sync_file_range 27#define __NR_sync_file_range2 __NR_arm_sync_file_range
371#define __NR_tee (__NR_SYSCALL_BASE+342)
372#define __NR_vmsplice (__NR_SYSCALL_BASE+343)
373#define __NR_move_pages (__NR_SYSCALL_BASE+344)
374#define __NR_getcpu (__NR_SYSCALL_BASE+345)
375#define __NR_epoll_pwait (__NR_SYSCALL_BASE+346)
376#define __NR_kexec_load (__NR_SYSCALL_BASE+347)
377#define __NR_utimensat (__NR_SYSCALL_BASE+348)
378#define __NR_signalfd (__NR_SYSCALL_BASE+349)
379#define __NR_timerfd_create (__NR_SYSCALL_BASE+350)
380#define __NR_eventfd (__NR_SYSCALL_BASE+351)
381#define __NR_fallocate (__NR_SYSCALL_BASE+352)
382#define __NR_timerfd_settime (__NR_SYSCALL_BASE+353)
383#define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354)
384#define __NR_signalfd4 (__NR_SYSCALL_BASE+355)
385#define __NR_eventfd2 (__NR_SYSCALL_BASE+356)
386#define __NR_epoll_create1 (__NR_SYSCALL_BASE+357)
387#define __NR_dup3 (__NR_SYSCALL_BASE+358)
388#define __NR_pipe2 (__NR_SYSCALL_BASE+359)
389#define __NR_inotify_init1 (__NR_SYSCALL_BASE+360)
390#define __NR_preadv (__NR_SYSCALL_BASE+361)
391#define __NR_pwritev (__NR_SYSCALL_BASE+362)
392#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
393#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
394#define __NR_recvmmsg (__NR_SYSCALL_BASE+365)
395#define __NR_accept4 (__NR_SYSCALL_BASE+366)
396#define __NR_fanotify_init (__NR_SYSCALL_BASE+367)
397#define __NR_fanotify_mark (__NR_SYSCALL_BASE+368)
398#define __NR_prlimit64 (__NR_SYSCALL_BASE+369)
399#define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370)
400#define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371)
401#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372)
402#define __NR_syncfs (__NR_SYSCALL_BASE+373)
403#define __NR_sendmmsg (__NR_SYSCALL_BASE+374)
404#define __NR_setns (__NR_SYSCALL_BASE+375)
405#define __NR_process_vm_readv (__NR_SYSCALL_BASE+376)
406#define __NR_process_vm_writev (__NR_SYSCALL_BASE+377)
407#define __NR_kcmp (__NR_SYSCALL_BASE+378)
408#define __NR_finit_module (__NR_SYSCALL_BASE+379)
409#define __NR_sched_setattr (__NR_SYSCALL_BASE+380)
410#define __NR_sched_getattr (__NR_SYSCALL_BASE+381)
411#define __NR_renameat2 (__NR_SYSCALL_BASE+382)
412#define __NR_seccomp (__NR_SYSCALL_BASE+383)
413#define __NR_getrandom (__NR_SYSCALL_BASE+384)
414#define __NR_memfd_create (__NR_SYSCALL_BASE+385)
415#define __NR_bpf (__NR_SYSCALL_BASE+386)
416#define __NR_execveat (__NR_SYSCALL_BASE+387)
417#define __NR_userfaultfd (__NR_SYSCALL_BASE+388)
418#define __NR_membarrier (__NR_SYSCALL_BASE+389)
419#define __NR_mlock2 (__NR_SYSCALL_BASE+390)
420#define __NR_copy_file_range (__NR_SYSCALL_BASE+391)
421#define __NR_preadv2 (__NR_SYSCALL_BASE+392)
422#define __NR_pwritev2 (__NR_SYSCALL_BASE+393)
423 28
424/* 29/*
425 * The following SWIs are ARM private. 30 * The following SWIs are ARM private.
@@ -431,24 +36,4 @@
431#define __ARM_NR_usr32 (__ARM_NR_BASE+4) 36#define __ARM_NR_usr32 (__ARM_NR_BASE+4)
432#define __ARM_NR_set_tls (__ARM_NR_BASE+5) 37#define __ARM_NR_set_tls (__ARM_NR_BASE+5)
433 38
434/*
435 * The following syscalls are obsolete and no longer available for EABI.
436 */
437#if !defined(__KERNEL__)
438#if defined(__ARM_EABI__)
439#undef __NR_time
440#undef __NR_umount
441#undef __NR_stime
442#undef __NR_alarm
443#undef __NR_utime
444#undef __NR_getrlimit
445#undef __NR_select
446#undef __NR_readdir
447#undef __NR_mmap
448#undef __NR_socketcall
449#undef __NR_syscall
450#undef __NR_ipc
451#endif
452#endif
453
454#endif /* _UAPI__ASM_ARM_UNISTD_H */ 39#endif /* _UAPI__ASM_ARM_UNISTD_H */
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
deleted file mode 100644
index 703fa0f3cd8f..000000000000
--- a/arch/arm/kernel/calls.S
+++ /dev/null
@@ -1,412 +0,0 @@
1/*
2 * linux/arch/arm/kernel/calls.S
3 *
4 * Copyright (C) 1995-2005 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file is included thrice in entry-common.S
11 */
12/* 0 */ CALL(sys_restart_syscall)
13 CALL(sys_exit)
14 CALL(sys_fork)
15 CALL(sys_read)
16 CALL(sys_write)
17/* 5 */ CALL(sys_open)
18 CALL(sys_close)
19 CALL(sys_ni_syscall) /* was sys_waitpid */
20 CALL(sys_creat)
21 CALL(sys_link)
22/* 10 */ CALL(sys_unlink)
23 CALL(sys_execve)
24 CALL(sys_chdir)
25 CALL(OBSOLETE(sys_time)) /* used by libc4 */
26 CALL(sys_mknod)
27/* 15 */ CALL(sys_chmod)
28 CALL(sys_lchown16)
29 CALL(sys_ni_syscall) /* was sys_break */
30 CALL(sys_ni_syscall) /* was sys_stat */
31 CALL(sys_lseek)
32/* 20 */ CALL(sys_getpid)
33 CALL(sys_mount)
34 CALL(OBSOLETE(sys_oldumount)) /* used by libc4 */
35 CALL(sys_setuid16)
36 CALL(sys_getuid16)
37/* 25 */ CALL(OBSOLETE(sys_stime))
38 CALL(sys_ptrace)
39 CALL(OBSOLETE(sys_alarm)) /* used by libc4 */
40 CALL(sys_ni_syscall) /* was sys_fstat */
41 CALL(sys_pause)
42/* 30 */ CALL(OBSOLETE(sys_utime)) /* used by libc4 */
43 CALL(sys_ni_syscall) /* was sys_stty */
44 CALL(sys_ni_syscall) /* was sys_getty */
45 CALL(sys_access)
46 CALL(sys_nice)
47/* 35 */ CALL(sys_ni_syscall) /* was sys_ftime */
48 CALL(sys_sync)
49 CALL(sys_kill)
50 CALL(sys_rename)
51 CALL(sys_mkdir)
52/* 40 */ CALL(sys_rmdir)
53 CALL(sys_dup)
54 CALL(sys_pipe)
55 CALL(sys_times)
56 CALL(sys_ni_syscall) /* was sys_prof */
57/* 45 */ CALL(sys_brk)
58 CALL(sys_setgid16)
59 CALL(sys_getgid16)
60 CALL(sys_ni_syscall) /* was sys_signal */
61 CALL(sys_geteuid16)
62/* 50 */ CALL(sys_getegid16)
63 CALL(sys_acct)
64 CALL(sys_umount)
65 CALL(sys_ni_syscall) /* was sys_lock */
66 CALL(sys_ioctl)
67/* 55 */ CALL(sys_fcntl)
68 CALL(sys_ni_syscall) /* was sys_mpx */
69 CALL(sys_setpgid)
70 CALL(sys_ni_syscall) /* was sys_ulimit */
71 CALL(sys_ni_syscall) /* was sys_olduname */
72/* 60 */ CALL(sys_umask)
73 CALL(sys_chroot)
74 CALL(sys_ustat)
75 CALL(sys_dup2)
76 CALL(sys_getppid)
77/* 65 */ CALL(sys_getpgrp)
78 CALL(sys_setsid)
79 CALL(sys_sigaction)
80 CALL(sys_ni_syscall) /* was sys_sgetmask */
81 CALL(sys_ni_syscall) /* was sys_ssetmask */
82/* 70 */ CALL(sys_setreuid16)
83 CALL(sys_setregid16)
84 CALL(sys_sigsuspend)
85 CALL(sys_sigpending)
86 CALL(sys_sethostname)
87/* 75 */ CALL(sys_setrlimit)
88 CALL(OBSOLETE(sys_old_getrlimit)) /* used by libc4 */
89 CALL(sys_getrusage)
90 CALL(sys_gettimeofday)
91 CALL(sys_settimeofday)
92/* 80 */ CALL(sys_getgroups16)
93 CALL(sys_setgroups16)
94 CALL(OBSOLETE(sys_old_select)) /* used by libc4 */
95 CALL(sys_symlink)
96 CALL(sys_ni_syscall) /* was sys_lstat */
97/* 85 */ CALL(sys_readlink)
98 CALL(sys_uselib)
99 CALL(sys_swapon)
100 CALL(sys_reboot)
101 CALL(OBSOLETE(sys_old_readdir)) /* used by libc4 */
102/* 90 */ CALL(OBSOLETE(sys_old_mmap)) /* used by libc4 */
103 CALL(sys_munmap)
104 CALL(sys_truncate)
105 CALL(sys_ftruncate)
106 CALL(sys_fchmod)
107/* 95 */ CALL(sys_fchown16)
108 CALL(sys_getpriority)
109 CALL(sys_setpriority)
110 CALL(sys_ni_syscall) /* was sys_profil */
111 CALL(sys_statfs)
112/* 100 */ CALL(sys_fstatfs)
113 CALL(sys_ni_syscall) /* sys_ioperm */
114 CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
115 CALL(sys_syslog)
116 CALL(sys_setitimer)
117/* 105 */ CALL(sys_getitimer)
118 CALL(sys_newstat)
119 CALL(sys_newlstat)
120 CALL(sys_newfstat)
121 CALL(sys_ni_syscall) /* was sys_uname */
122/* 110 */ CALL(sys_ni_syscall) /* was sys_iopl */
123 CALL(sys_vhangup)
124 CALL(sys_ni_syscall)
125 CALL(OBSOLETE(sys_syscall)) /* call a syscall */
126 CALL(sys_wait4)
127/* 115 */ CALL(sys_swapoff)
128 CALL(sys_sysinfo)
129 CALL(OBSOLETE(ABI(sys_ipc, sys_oabi_ipc)))
130 CALL(sys_fsync)
131 CALL(sys_sigreturn_wrapper)
132/* 120 */ CALL(sys_clone)
133 CALL(sys_setdomainname)
134 CALL(sys_newuname)
135 CALL(sys_ni_syscall) /* modify_ldt */
136 CALL(sys_adjtimex)
137/* 125 */ CALL(sys_mprotect)
138 CALL(sys_sigprocmask)
139 CALL(sys_ni_syscall) /* was sys_create_module */
140 CALL(sys_init_module)
141 CALL(sys_delete_module)
142/* 130 */ CALL(sys_ni_syscall) /* was sys_get_kernel_syms */
143 CALL(sys_quotactl)
144 CALL(sys_getpgid)
145 CALL(sys_fchdir)
146 CALL(sys_bdflush)
147/* 135 */ CALL(sys_sysfs)
148 CALL(sys_personality)
149 CALL(sys_ni_syscall) /* reserved for afs_syscall */
150 CALL(sys_setfsuid16)
151 CALL(sys_setfsgid16)
152/* 140 */ CALL(sys_llseek)
153 CALL(sys_getdents)
154 CALL(sys_select)
155 CALL(sys_flock)
156 CALL(sys_msync)
157/* 145 */ CALL(sys_readv)
158 CALL(sys_writev)
159 CALL(sys_getsid)
160 CALL(sys_fdatasync)
161 CALL(sys_sysctl)
162/* 150 */ CALL(sys_mlock)
163 CALL(sys_munlock)
164 CALL(sys_mlockall)
165 CALL(sys_munlockall)
166 CALL(sys_sched_setparam)
167/* 155 */ CALL(sys_sched_getparam)
168 CALL(sys_sched_setscheduler)
169 CALL(sys_sched_getscheduler)
170 CALL(sys_sched_yield)
171 CALL(sys_sched_get_priority_max)
172/* 160 */ CALL(sys_sched_get_priority_min)
173 CALL(sys_sched_rr_get_interval)
174 CALL(sys_nanosleep)
175 CALL(sys_mremap)
176 CALL(sys_setresuid16)
177/* 165 */ CALL(sys_getresuid16)
178 CALL(sys_ni_syscall) /* vm86 */
179 CALL(sys_ni_syscall) /* was sys_query_module */
180 CALL(sys_poll)
181 CALL(sys_ni_syscall) /* was nfsservctl */
182/* 170 */ CALL(sys_setresgid16)
183 CALL(sys_getresgid16)
184 CALL(sys_prctl)
185 CALL(sys_rt_sigreturn_wrapper)
186 CALL(sys_rt_sigaction)
187/* 175 */ CALL(sys_rt_sigprocmask)
188 CALL(sys_rt_sigpending)
189 CALL(sys_rt_sigtimedwait)
190 CALL(sys_rt_sigqueueinfo)
191 CALL(sys_rt_sigsuspend)
192/* 180 */ CALL(ABI(sys_pread64, sys_oabi_pread64))
193 CALL(ABI(sys_pwrite64, sys_oabi_pwrite64))
194 CALL(sys_chown16)
195 CALL(sys_getcwd)
196 CALL(sys_capget)
197/* 185 */ CALL(sys_capset)
198 CALL(sys_sigaltstack)
199 CALL(sys_sendfile)
200 CALL(sys_ni_syscall) /* getpmsg */
201 CALL(sys_ni_syscall) /* putpmsg */
202/* 190 */ CALL(sys_vfork)
203 CALL(sys_getrlimit)
204 CALL(sys_mmap2)
205 CALL(ABI(sys_truncate64, sys_oabi_truncate64))
206 CALL(ABI(sys_ftruncate64, sys_oabi_ftruncate64))
207/* 195 */ CALL(ABI(sys_stat64, sys_oabi_stat64))
208 CALL(ABI(sys_lstat64, sys_oabi_lstat64))
209 CALL(ABI(sys_fstat64, sys_oabi_fstat64))
210 CALL(sys_lchown)
211 CALL(sys_getuid)
212/* 200 */ CALL(sys_getgid)
213 CALL(sys_geteuid)
214 CALL(sys_getegid)
215 CALL(sys_setreuid)
216 CALL(sys_setregid)
217/* 205 */ CALL(sys_getgroups)
218 CALL(sys_setgroups)
219 CALL(sys_fchown)
220 CALL(sys_setresuid)
221 CALL(sys_getresuid)
222/* 210 */ CALL(sys_setresgid)
223 CALL(sys_getresgid)
224 CALL(sys_chown)
225 CALL(sys_setuid)
226 CALL(sys_setgid)
227/* 215 */ CALL(sys_setfsuid)
228 CALL(sys_setfsgid)
229 CALL(sys_getdents64)
230 CALL(sys_pivot_root)
231 CALL(sys_mincore)
232/* 220 */ CALL(sys_madvise)
233 CALL(ABI(sys_fcntl64, sys_oabi_fcntl64))
234 CALL(sys_ni_syscall) /* TUX */
235 CALL(sys_ni_syscall)
236 CALL(sys_gettid)
237/* 225 */ CALL(ABI(sys_readahead, sys_oabi_readahead))
238 CALL(sys_setxattr)
239 CALL(sys_lsetxattr)
240 CALL(sys_fsetxattr)
241 CALL(sys_getxattr)
242/* 230 */ CALL(sys_lgetxattr)
243 CALL(sys_fgetxattr)
244 CALL(sys_listxattr)
245 CALL(sys_llistxattr)
246 CALL(sys_flistxattr)
247/* 235 */ CALL(sys_removexattr)
248 CALL(sys_lremovexattr)
249 CALL(sys_fremovexattr)
250 CALL(sys_tkill)
251 CALL(sys_sendfile64)
252/* 240 */ CALL(sys_futex)
253 CALL(sys_sched_setaffinity)
254 CALL(sys_sched_getaffinity)
255 CALL(sys_io_setup)
256 CALL(sys_io_destroy)
257/* 245 */ CALL(sys_io_getevents)
258 CALL(sys_io_submit)
259 CALL(sys_io_cancel)
260 CALL(sys_exit_group)
261 CALL(sys_lookup_dcookie)
262/* 250 */ CALL(sys_epoll_create)
263 CALL(ABI(sys_epoll_ctl, sys_oabi_epoll_ctl))
264 CALL(ABI(sys_epoll_wait, sys_oabi_epoll_wait))
265 CALL(sys_remap_file_pages)
266 CALL(sys_ni_syscall) /* sys_set_thread_area */
267/* 255 */ CALL(sys_ni_syscall) /* sys_get_thread_area */
268 CALL(sys_set_tid_address)
269 CALL(sys_timer_create)
270 CALL(sys_timer_settime)
271 CALL(sys_timer_gettime)
272/* 260 */ CALL(sys_timer_getoverrun)
273 CALL(sys_timer_delete)
274 CALL(sys_clock_settime)
275 CALL(sys_clock_gettime)
276 CALL(sys_clock_getres)
277/* 265 */ CALL(sys_clock_nanosleep)
278 CALL(sys_statfs64_wrapper)
279 CALL(sys_fstatfs64_wrapper)
280 CALL(sys_tgkill)
281 CALL(sys_utimes)
282/* 270 */ CALL(sys_arm_fadvise64_64)
283 CALL(sys_pciconfig_iobase)
284 CALL(sys_pciconfig_read)
285 CALL(sys_pciconfig_write)
286 CALL(sys_mq_open)
287/* 275 */ CALL(sys_mq_unlink)
288 CALL(sys_mq_timedsend)
289 CALL(sys_mq_timedreceive)
290 CALL(sys_mq_notify)
291 CALL(sys_mq_getsetattr)
292/* 280 */ CALL(sys_waitid)
293 CALL(sys_socket)
294 CALL(ABI(sys_bind, sys_oabi_bind))
295 CALL(ABI(sys_connect, sys_oabi_connect))
296 CALL(sys_listen)
297/* 285 */ CALL(sys_accept)
298 CALL(sys_getsockname)
299 CALL(sys_getpeername)
300 CALL(sys_socketpair)
301 CALL(sys_send)
302/* 290 */ CALL(ABI(sys_sendto, sys_oabi_sendto))
303 CALL(sys_recv)
304 CALL(sys_recvfrom)
305 CALL(sys_shutdown)
306 CALL(sys_setsockopt)
307/* 295 */ CALL(sys_getsockopt)
308 CALL(ABI(sys_sendmsg, sys_oabi_sendmsg))
309 CALL(sys_recvmsg)
310 CALL(ABI(sys_semop, sys_oabi_semop))
311 CALL(sys_semget)
312/* 300 */ CALL(sys_semctl)
313 CALL(sys_msgsnd)
314 CALL(sys_msgrcv)
315 CALL(sys_msgget)
316 CALL(sys_msgctl)
317/* 305 */ CALL(sys_shmat)
318 CALL(sys_shmdt)
319 CALL(sys_shmget)
320 CALL(sys_shmctl)
321 CALL(sys_add_key)
322/* 310 */ CALL(sys_request_key)
323 CALL(sys_keyctl)
324 CALL(ABI(sys_semtimedop, sys_oabi_semtimedop))
325/* vserver */ CALL(sys_ni_syscall)
326 CALL(sys_ioprio_set)
327/* 315 */ CALL(sys_ioprio_get)
328 CALL(sys_inotify_init)
329 CALL(sys_inotify_add_watch)
330 CALL(sys_inotify_rm_watch)
331 CALL(sys_mbind)
332/* 320 */ CALL(sys_get_mempolicy)
333 CALL(sys_set_mempolicy)
334 CALL(sys_openat)
335 CALL(sys_mkdirat)
336 CALL(sys_mknodat)
337/* 325 */ CALL(sys_fchownat)
338 CALL(sys_futimesat)
339 CALL(ABI(sys_fstatat64, sys_oabi_fstatat64))
340 CALL(sys_unlinkat)
341 CALL(sys_renameat)
342/* 330 */ CALL(sys_linkat)
343 CALL(sys_symlinkat)
344 CALL(sys_readlinkat)
345 CALL(sys_fchmodat)
346 CALL(sys_faccessat)
347/* 335 */ CALL(sys_pselect6)
348 CALL(sys_ppoll)
349 CALL(sys_unshare)
350 CALL(sys_set_robust_list)
351 CALL(sys_get_robust_list)
352/* 340 */ CALL(sys_splice)
353 CALL(sys_sync_file_range2)
354 CALL(sys_tee)
355 CALL(sys_vmsplice)
356 CALL(sys_move_pages)
357/* 345 */ CALL(sys_getcpu)
358 CALL(sys_epoll_pwait)
359 CALL(sys_kexec_load)
360 CALL(sys_utimensat)
361 CALL(sys_signalfd)
362/* 350 */ CALL(sys_timerfd_create)
363 CALL(sys_eventfd)
364 CALL(sys_fallocate)
365 CALL(sys_timerfd_settime)
366 CALL(sys_timerfd_gettime)
367/* 355 */ CALL(sys_signalfd4)
368 CALL(sys_eventfd2)
369 CALL(sys_epoll_create1)
370 CALL(sys_dup3)
371 CALL(sys_pipe2)
372/* 360 */ CALL(sys_inotify_init1)
373 CALL(sys_preadv)
374 CALL(sys_pwritev)
375 CALL(sys_rt_tgsigqueueinfo)
376 CALL(sys_perf_event_open)
377/* 365 */ CALL(sys_recvmmsg)
378 CALL(sys_accept4)
379 CALL(sys_fanotify_init)
380 CALL(sys_fanotify_mark)
381 CALL(sys_prlimit64)
382/* 370 */ CALL(sys_name_to_handle_at)
383 CALL(sys_open_by_handle_at)
384 CALL(sys_clock_adjtime)
385 CALL(sys_syncfs)
386 CALL(sys_sendmmsg)
387/* 375 */ CALL(sys_setns)
388 CALL(sys_process_vm_readv)
389 CALL(sys_process_vm_writev)
390 CALL(sys_kcmp)
391 CALL(sys_finit_module)
392/* 380 */ CALL(sys_sched_setattr)
393 CALL(sys_sched_getattr)
394 CALL(sys_renameat2)
395 CALL(sys_seccomp)
396 CALL(sys_getrandom)
397/* 385 */ CALL(sys_memfd_create)
398 CALL(sys_bpf)
399 CALL(sys_execveat)
400 CALL(sys_userfaultfd)
401 CALL(sys_membarrier)
402/* 390 */ CALL(sys_mlock2)
403 CALL(sys_copy_file_range)
404 CALL(sys_preadv2)
405 CALL(sys_pwritev2)
406#ifndef syscalls_counted
407.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
408#define syscalls_counted
409#endif
410.rept syscalls_padding
411 CALL(sys_ni_syscall)
412.endr
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 10c3283d6c19..eb5cd77bf1d8 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -12,6 +12,11 @@
12#include <asm/unistd.h> 12#include <asm/unistd.h>
13#include <asm/ftrace.h> 13#include <asm/ftrace.h>
14#include <asm/unwind.h> 14#include <asm/unwind.h>
15#ifdef CONFIG_AEABI
16#include <asm/unistd-oabi.h>
17#endif
18
19 .equ NR_syscalls, __NR_syscalls
15 20
16#ifdef CONFIG_NEED_RET_TO_USER 21#ifdef CONFIG_NEED_RET_TO_USER
17#include <mach/entry-macro.S> 22#include <mach/entry-macro.S>
@@ -120,21 +125,6 @@ ENTRY(ret_from_fork)
120 b ret_slow_syscall 125 b ret_slow_syscall
121ENDPROC(ret_from_fork) 126ENDPROC(ret_from_fork)
122 127
123 .equ NR_syscalls,0
124#define CALL(x) .equ NR_syscalls,NR_syscalls+1
125#include "calls.S"
126
127/*
128 * Ensure that the system call table is equal to __NR_syscalls,
129 * which is the value the rest of the system sees
130 */
131.ifne NR_syscalls - __NR_syscalls
132.error "__NR_syscalls is not equal to the size of the syscall table"
133.endif
134
135#undef CALL
136#define CALL(x) .long x
137
138/*============================================================================= 128/*=============================================================================
139 * SWI handler 129 * SWI handler
140 *----------------------------------------------------------------------------- 130 *-----------------------------------------------------------------------------
@@ -291,22 +281,48 @@ __cr_alignment:
291#endif 281#endif
292 .ltorg 282 .ltorg
293 283
284 .macro syscall_table_start, sym
285 .equ __sys_nr, 0
286 .type \sym, #object
287ENTRY(\sym)
288 .endm
289
290 .macro syscall, nr, func
291 .ifgt __sys_nr - \nr
292 .error "Duplicated/unorded system call entry"
293 .endif
294 .rept \nr - __sys_nr
295 .long sys_ni_syscall
296 .endr
297 .long \func
298 .equ __sys_nr, \nr + 1
299 .endm
300
301 .macro syscall_table_end, sym
302 .ifgt __sys_nr - __NR_syscalls
303 .error "System call table too big"
304 .endif
305 .rept __NR_syscalls - __sys_nr
306 .long sys_ni_syscall
307 .endr
308 .size \sym, . - \sym
309 .endm
310
311#define NATIVE(nr, func) syscall nr, func
312
294/* 313/*
295 * This is the syscall table declaration for native ABI syscalls. 314 * This is the syscall table declaration for native ABI syscalls.
296 * With EABI a couple syscalls are obsolete and defined as sys_ni_syscall. 315 * With EABI a couple syscalls are obsolete and defined as sys_ni_syscall.
297 */ 316 */
298#define ABI(native, compat) native 317 syscall_table_start sys_call_table
318#define COMPAT(nr, native, compat) syscall nr, native
299#ifdef CONFIG_AEABI 319#ifdef CONFIG_AEABI
300#define OBSOLETE(syscall) sys_ni_syscall 320#include <calls-eabi.S>
301#else 321#else
302#define OBSOLETE(syscall) syscall 322#include <calls-oabi.S>
303#endif 323#endif
304 324#undef COMPAT
305 .type sys_call_table, #object 325 syscall_table_end sys_call_table
306ENTRY(sys_call_table)
307#include "calls.S"
308#undef ABI
309#undef OBSOLETE
310 326
311/*============================================================================ 327/*============================================================================
312 * Special system call wrappers 328 * Special system call wrappers
@@ -407,14 +423,10 @@ ENDPROC(sys_oabi_readahead)
407 * Let's declare a second syscall table for old ABI binaries 423 * Let's declare a second syscall table for old ABI binaries
408 * using the compatibility syscall entries. 424 * using the compatibility syscall entries.
409 */ 425 */
410#define ABI(native, compat) compat 426 syscall_table_start sys_oabi_call_table
411#define OBSOLETE(syscall) syscall 427#define COMPAT(nr, native, compat) syscall nr, compat
412 428#include <calls-oabi.S>
413 .type sys_oabi_call_table, #object 429 syscall_table_end sys_oabi_call_table
414ENTRY(sys_oabi_call_table)
415#include "calls.S"
416#undef ABI
417#undef OBSOLETE
418 430
419#endif 431#endif
420 432
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index bdf48e4949ad..92eb5c3b486c 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -6,17 +6,31 @@
6 6
7gen := arch/$(ARCH)/include/generated 7gen := arch/$(ARCH)/include/generated
8kapi := $(gen)/asm 8kapi := $(gen)/asm
9uapi := $(gen)/uapi/asm
10syshdr := $(srctree)/$(src)/syscallhdr.sh
11sysnr := $(srctree)/$(src)/syscallnr.sh
12systbl := $(srctree)/$(src)/syscalltbl.sh
13syscall := $(srctree)/$(src)/syscall.tbl
9 14
10kapi-hdrs-y := $(kapi)/mach-types.h 15gen-y := $(gen)/calls-oabi.S
16gen-y += $(gen)/calls-eabi.S
17kapi-hdrs-y := $(kapi)/unistd-nr.h
18kapi-hdrs-y += $(kapi)/mach-types.h
19uapi-hdrs-y := $(uapi)/unistd-common.h
20uapi-hdrs-y += $(uapi)/unistd-oabi.h
21uapi-hdrs-y += $(uapi)/unistd-eabi.h
11 22
12targets += $(addprefix ../../../,$(kapi-hdrs-y)) 23targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
13 24
14PHONY += kapi 25PHONY += kapi uapi
15 26
16kapi: $(kapi-hdrs-y) 27kapi: $(kapi-hdrs-y) $(gen-y)
28
29uapi: $(uapi-hdrs-y)
17 30
18# Create output directory if not already present 31# Create output directory if not already present
19_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 32_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \
33 $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')
20 34
21quiet_cmd_gen_mach = GEN $@ 35quiet_cmd_gen_mach = GEN $@
22 cmd_gen_mach = mkdir -p $(dir $@) && \ 36 cmd_gen_mach = mkdir -p $(dir $@) && \
@@ -25,3 +39,41 @@ quiet_cmd_gen_mach = GEN $@
25 39
26$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE 40$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
27 $(call if_changed,gen_mach) 41 $(call if_changed,gen_mach)
42
43quiet_cmd_syshdr = SYSHDR $@
44 cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
45 '$(syshdr_abi_$(basetarget))' \
46 '$(syshdr_pfx_$(basetarget))' \
47 '__NR_SYSCALL_BASE'
48
49quiet_cmd_systbl = SYSTBL $@
50 cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \
51 '$(systbl_abi_$(basetarget))'
52
53quiet_cmd_sysnr = SYSNR $@
54 cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@' \
55 '$(syshdr_abi_$(basetarget))'
56
57syshdr_abi_unistd-common := common
58$(uapi)/unistd-common.h: $(syscall) $(syshdr) FORCE
59 $(call if_changed,syshdr)
60
61syshdr_abi_unistd-oabi := oabi
62$(uapi)/unistd-oabi.h: $(syscall) $(syshdr) FORCE
63 $(call if_changed,syshdr)
64
65syshdr_abi_unistd-eabi := eabi
66$(uapi)/unistd-eabi.h: $(syscall) $(syshdr) FORCE
67 $(call if_changed,syshdr)
68
69sysnr_abi_unistd-nr := common,oabi,eabi,compat
70$(kapi)/unistd-nr.h: $(syscall) $(sysnr) FORCE
71 $(call if_changed,sysnr)
72
73systbl_abi_calls-oabi := common,oabi
74$(gen)/calls-oabi.S: $(syscall) $(systbl) FORCE
75 $(call if_changed,systbl)
76
77systbl_abi_calls-eabi := common,eabi
78$(gen)/calls-eabi.S: $(syscall) $(systbl) FORCE
79 $(call if_changed,systbl)
diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl
new file mode 100644
index 000000000000..4eca42d791ce
--- /dev/null
+++ b/arch/arm/tools/syscall.tbl
@@ -0,0 +1,410 @@
1#
2# Linux system call numbers and entry vectors
3#
4# The format is:
5# <num> <abi> <name> [<entry point> [<oabi compat entry point>]]
6#
7# Where abi is:
8# common - for system calls shared between oabi and eabi (may have compat)
9# oabi - for oabi-only system calls (may have compat)
10# eabi - for eabi-only system calls
11#
12# For each syscall number, "common" is mutually exclusive with oabi and eabi
13#
140 common restart_syscall sys_restart_syscall
151 common exit sys_exit
162 common fork sys_fork
173 common read sys_read
184 common write sys_write
195 common open sys_open
206 common close sys_close
21# 7 was sys_waitpid
228 common creat sys_creat
239 common link sys_link
2410 common unlink sys_unlink
2511 common execve sys_execve
2612 common chdir sys_chdir
2713 oabi time sys_time
2814 common mknod sys_mknod
2915 common chmod sys_chmod
3016 common lchown sys_lchown16
31# 17 was sys_break
32# 18 was sys_stat
3319 common lseek sys_lseek
3420 common getpid sys_getpid
3521 common mount sys_mount
3622 oabi umount sys_oldumount
3723 common setuid sys_setuid16
3824 common getuid sys_getuid16
3925 oabi stime sys_stime
4026 common ptrace sys_ptrace
4127 oabi alarm sys_alarm
42# 28 was sys_fstat
4329 common pause sys_pause
4430 oabi utime sys_utime
45# 31 was sys_stty
46# 32 was sys_gtty
4733 common access sys_access
4834 common nice sys_nice
49# 35 was sys_ftime
5036 common sync sys_sync
5137 common kill sys_kill
5238 common rename sys_rename
5339 common mkdir sys_mkdir
5440 common rmdir sys_rmdir
5541 common dup sys_dup
5642 common pipe sys_pipe
5743 common times sys_times
58# 44 was sys_prof
5945 common brk sys_brk
6046 common setgid sys_setgid16
6147 common getgid sys_getgid16
62# 48 was sys_signal
6349 common geteuid sys_geteuid16
6450 common getegid sys_getegid16
6551 common acct sys_acct
6652 common umount2 sys_umount
67# 53 was sys_lock
6854 common ioctl sys_ioctl
6955 common fcntl sys_fcntl
70# 56 was sys_mpx
7157 common setpgid sys_setpgid
72# 58 was sys_ulimit
73# 59 was sys_olduname
7460 common umask sys_umask
7561 common chroot sys_chroot
7662 common ustat sys_ustat
7763 common dup2 sys_dup2
7864 common getppid sys_getppid
7965 common getpgrp sys_getpgrp
8066 common setsid sys_setsid
8167 common sigaction sys_sigaction
82# 68 was sys_sgetmask
83# 69 was sys_ssetmask
8470 common setreuid sys_setreuid16
8571 common setregid sys_setregid16
8672 common sigsuspend sys_sigsuspend
8773 common sigpending sys_sigpending
8874 common sethostname sys_sethostname
8975 common setrlimit sys_setrlimit
90# Back compat 2GB limited rlimit
9176 oabi getrlimit sys_old_getrlimit
9277 common getrusage sys_getrusage
9378 common gettimeofday sys_gettimeofday
9479 common settimeofday sys_settimeofday
9580 common getgroups sys_getgroups16
9681 common setgroups sys_setgroups16
9782 oabi select sys_old_select
9883 common symlink sys_symlink
99# 84 was sys_lstat
10085 common readlink sys_readlink
10186 common uselib sys_uselib
10287 common swapon sys_swapon
10388 common reboot sys_reboot
10489 oabi readdir sys_old_readdir
10590 oabi mmap sys_old_mmap
10691 common munmap sys_munmap
10792 common truncate sys_truncate
10893 common ftruncate sys_ftruncate
10994 common fchmod sys_fchmod
11095 common fchown sys_fchown16
11196 common getpriority sys_getpriority
11297 common setpriority sys_setpriority
113# 98 was sys_profil
11499 common statfs sys_statfs
115100 common fstatfs sys_fstatfs
116# 101 was sys_ioperm
117102 oabi socketcall sys_socketcall sys_oabi_socketcall
118103 common syslog sys_syslog
119104 common setitimer sys_setitimer
120105 common getitimer sys_getitimer
121106 common stat sys_newstat
122107 common lstat sys_newlstat
123108 common fstat sys_newfstat
124# 109 was sys_uname
125# 110 was sys_iopl
126111 common vhangup sys_vhangup
127# 112 was sys_idle
128# syscall to call a syscall!
129113 oabi syscall sys_syscall
130114 common wait4 sys_wait4
131115 common swapoff sys_swapoff
132116 common sysinfo sys_sysinfo
133117 oabi ipc sys_ipc sys_oabi_ipc
134118 common fsync sys_fsync
135119 common sigreturn sys_sigreturn_wrapper
136120 common clone sys_clone
137121 common setdomainname sys_setdomainname
138122 common uname sys_newuname
139# 123 was sys_modify_ldt
140124 common adjtimex sys_adjtimex
141125 common mprotect sys_mprotect
142126 common sigprocmask sys_sigprocmask
143# 127 was sys_create_module
144128 common init_module sys_init_module
145129 common delete_module sys_delete_module
146# 130 was sys_get_kernel_syms
147131 common quotactl sys_quotactl
148132 common getpgid sys_getpgid
149133 common fchdir sys_fchdir
150134 common bdflush sys_bdflush
151135 common sysfs sys_sysfs
152136 common personality sys_personality
153# 137 was sys_afs_syscall
154138 common setfsuid sys_setfsuid16
155139 common setfsgid sys_setfsgid16
156140 common _llseek sys_llseek
157141 common getdents sys_getdents
158142 common _newselect sys_select
159143 common flock sys_flock
160144 common msync sys_msync
161145 common readv sys_readv
162146 common writev sys_writev
163147 common getsid sys_getsid
164148 common fdatasync sys_fdatasync
165149 common _sysctl sys_sysctl
166150 common mlock sys_mlock
167151 common munlock sys_munlock
168152 common mlockall sys_mlockall
169153 common munlockall sys_munlockall
170154 common sched_setparam sys_sched_setparam
171155 common sched_getparam sys_sched_getparam
172156 common sched_setscheduler sys_sched_setscheduler
173157 common sched_getscheduler sys_sched_getscheduler
174158 common sched_yield sys_sched_yield
175159 common sched_get_priority_max sys_sched_get_priority_max
176160 common sched_get_priority_min sys_sched_get_priority_min
177161 common sched_rr_get_interval sys_sched_rr_get_interval
178162 common nanosleep sys_nanosleep
179163 common mremap sys_mremap
180164 common setresuid sys_setresuid16
181165 common getresuid sys_getresuid16
182# 166 was sys_vm86
183# 167 was sys_query_module
184168 common poll sys_poll
185169 common nfsservctl
186170 common setresgid sys_setresgid16
187171 common getresgid sys_getresgid16
188172 common prctl sys_prctl
189173 common rt_sigreturn sys_rt_sigreturn_wrapper
190174 common rt_sigaction sys_rt_sigaction
191175 common rt_sigprocmask sys_rt_sigprocmask
192176 common rt_sigpending sys_rt_sigpending
193177 common rt_sigtimedwait sys_rt_sigtimedwait
194178 common rt_sigqueueinfo sys_rt_sigqueueinfo
195179 common rt_sigsuspend sys_rt_sigsuspend
196180 common pread64 sys_pread64 sys_oabi_pread64
197181 common pwrite64 sys_pwrite64 sys_oabi_pwrite64
198182 common chown sys_chown16
199183 common getcwd sys_getcwd
200184 common capget sys_capget
201185 common capset sys_capset
202186 common sigaltstack sys_sigaltstack
203187 common sendfile sys_sendfile
204# 188 reserved
205# 189 reserved
206190 common vfork sys_vfork
207# SuS compliant getrlimit
208191 common ugetrlimit sys_getrlimit
209192 common mmap2 sys_mmap2
210193 common truncate64 sys_truncate64 sys_oabi_truncate64
211194 common ftruncate64 sys_ftruncate64 sys_oabi_ftruncate64
212195 common stat64 sys_stat64 sys_oabi_stat64
213196 common lstat64 sys_lstat64 sys_oabi_lstat64
214197 common fstat64 sys_fstat64 sys_oabi_fstat64
215198 common lchown32 sys_lchown
216199 common getuid32 sys_getuid
217200 common getgid32 sys_getgid
218201 common geteuid32 sys_geteuid
219202 common getegid32 sys_getegid
220203 common setreuid32 sys_setreuid
221204 common setregid32 sys_setregid
222205 common getgroups32 sys_getgroups
223206 common setgroups32 sys_setgroups
224207 common fchown32 sys_fchown
225208 common setresuid32 sys_setresuid
226209 common getresuid32 sys_getresuid
227210 common setresgid32 sys_setresgid
228211 common getresgid32 sys_getresgid
229212 common chown32 sys_chown
230213 common setuid32 sys_setuid
231214 common setgid32 sys_setgid
232215 common setfsuid32 sys_setfsuid
233216 common setfsgid32 sys_setfsgid
234217 common getdents64 sys_getdents64
235218 common pivot_root sys_pivot_root
236219 common mincore sys_mincore
237220 common madvise sys_madvise
238221 common fcntl64 sys_fcntl64 sys_oabi_fcntl64
239# 222 for tux
240# 223 is unused
241224 common gettid sys_gettid
242225 common readahead sys_readahead sys_oabi_readahead
243226 common setxattr sys_setxattr
244227 common lsetxattr sys_lsetxattr
245228 common fsetxattr sys_fsetxattr
246229 common getxattr sys_getxattr
247230 common lgetxattr sys_lgetxattr
248231 common fgetxattr sys_fgetxattr
249232 common listxattr sys_listxattr
250233 common llistxattr sys_llistxattr
251234 common flistxattr sys_flistxattr
252235 common removexattr sys_removexattr
253236 common lremovexattr sys_lremovexattr
254237 common fremovexattr sys_fremovexattr
255238 common tkill sys_tkill
256239 common sendfile64 sys_sendfile64
257240 common futex sys_futex
258241 common sched_setaffinity sys_sched_setaffinity
259242 common sched_getaffinity sys_sched_getaffinity
260243 common io_setup sys_io_setup
261244 common io_destroy sys_io_destroy
262245 common io_getevents sys_io_getevents
263246 common io_submit sys_io_submit
264247 common io_cancel sys_io_cancel
265248 common exit_group sys_exit_group
266249 common lookup_dcookie sys_lookup_dcookie
267250 common epoll_create sys_epoll_create
268251 common epoll_ctl sys_epoll_ctl sys_oabi_epoll_ctl
269252 common epoll_wait sys_epoll_wait sys_oabi_epoll_wait
270253 common remap_file_pages sys_remap_file_pages
271# 254 for set_thread_area
272# 255 for get_thread_area
273256 common set_tid_address sys_set_tid_address
274257 common timer_create sys_timer_create
275258 common timer_settime sys_timer_settime
276259 common timer_gettime sys_timer_gettime
277260 common timer_getoverrun sys_timer_getoverrun
278261 common timer_delete sys_timer_delete
279262 common clock_settime sys_clock_settime
280263 common clock_gettime sys_clock_gettime
281264 common clock_getres sys_clock_getres
282265 common clock_nanosleep sys_clock_nanosleep
283266 common statfs64 sys_statfs64_wrapper
284267 common fstatfs64 sys_fstatfs64_wrapper
285268 common tgkill sys_tgkill
286269 common utimes sys_utimes
287270 common arm_fadvise64_64 sys_arm_fadvise64_64
288271 common pciconfig_iobase sys_pciconfig_iobase
289272 common pciconfig_read sys_pciconfig_read
290273 common pciconfig_write sys_pciconfig_write
291274 common mq_open sys_mq_open
292275 common mq_unlink sys_mq_unlink
293276 common mq_timedsend sys_mq_timedsend
294277 common mq_timedreceive sys_mq_timedreceive
295278 common mq_notify sys_mq_notify
296279 common mq_getsetattr sys_mq_getsetattr
297280 common waitid sys_waitid
298281 common socket sys_socket
299282 common bind sys_bind sys_oabi_bind
300283 common connect sys_connect sys_oabi_connect
301284 common listen sys_listen
302285 common accept sys_accept
303286 common getsockname sys_getsockname
304287 common getpeername sys_getpeername
305288 common socketpair sys_socketpair
306289 common send sys_send
307290 common sendto sys_sendto sys_oabi_sendto
308291 common recv sys_recv
309292 common recvfrom sys_recvfrom
310293 common shutdown sys_shutdown
311294 common setsockopt sys_setsockopt
312295 common getsockopt sys_getsockopt
313296 common sendmsg sys_sendmsg sys_oabi_sendmsg
314297 common recvmsg sys_recvmsg
315298 common semop sys_semop sys_oabi_semop
316299 common semget sys_semget
317300 common semctl sys_semctl
318301 common msgsnd sys_msgsnd
319302 common msgrcv sys_msgrcv
320303 common msgget sys_msgget
321304 common msgctl sys_msgctl
322305 common shmat sys_shmat
323306 common shmdt sys_shmdt
324307 common shmget sys_shmget
325308 common shmctl sys_shmctl
326309 common add_key sys_add_key
327310 common request_key sys_request_key
328311 common keyctl sys_keyctl
329312 common semtimedop sys_semtimedop sys_oabi_semtimedop
330313 common vserver
331314 common ioprio_set sys_ioprio_set
332315 common ioprio_get sys_ioprio_get
333316 common inotify_init sys_inotify_init
334317 common inotify_add_watch sys_inotify_add_watch
335318 common inotify_rm_watch sys_inotify_rm_watch
336319 common mbind sys_mbind
337320 common get_mempolicy sys_get_mempolicy
338321 common set_mempolicy sys_set_mempolicy
339322 common openat sys_openat
340323 common mkdirat sys_mkdirat
341324 common mknodat sys_mknodat
342325 common fchownat sys_fchownat
343326 common futimesat sys_futimesat
344327 common fstatat64 sys_fstatat64 sys_oabi_fstatat64
345328 common unlinkat sys_unlinkat
346329 common renameat sys_renameat
347330 common linkat sys_linkat
348331 common symlinkat sys_symlinkat
349332 common readlinkat sys_readlinkat
350333 common fchmodat sys_fchmodat
351334 common faccessat sys_faccessat
352335 common pselect6 sys_pselect6
353336 common ppoll sys_ppoll
354337 common unshare sys_unshare
355338 common set_robust_list sys_set_robust_list
356339 common get_robust_list sys_get_robust_list
357340 common splice sys_splice
358341 common arm_sync_file_range sys_sync_file_range2
359342 common tee sys_tee
360343 common vmsplice sys_vmsplice
361344 common move_pages sys_move_pages
362345 common getcpu sys_getcpu
363346 common epoll_pwait sys_epoll_pwait
364347 common kexec_load sys_kexec_load
365348 common utimensat sys_utimensat
366349 common signalfd sys_signalfd
367350 common timerfd_create sys_timerfd_create
368351 common eventfd sys_eventfd
369352 common fallocate sys_fallocate
370353 common timerfd_settime sys_timerfd_settime
371354 common timerfd_gettime sys_timerfd_gettime
372355 common signalfd4 sys_signalfd4
373356 common eventfd2 sys_eventfd2
374357 common epoll_create1 sys_epoll_create1
375358 common dup3 sys_dup3
376359 common pipe2 sys_pipe2
377360 common inotify_init1 sys_inotify_init1
378361 common preadv sys_preadv
379362 common pwritev sys_pwritev
380363 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo
381364 common perf_event_open sys_perf_event_open
382365 common recvmmsg sys_recvmmsg
383366 common accept4 sys_accept4
384367 common fanotify_init sys_fanotify_init
385368 common fanotify_mark sys_fanotify_mark
386369 common prlimit64 sys_prlimit64
387370 common name_to_handle_at sys_name_to_handle_at
388371 common open_by_handle_at sys_open_by_handle_at
389372 common clock_adjtime sys_clock_adjtime
390373 common syncfs sys_syncfs
391374 common sendmmsg sys_sendmmsg
392375 common setns sys_setns
393376 common process_vm_readv sys_process_vm_readv
394377 common process_vm_writev sys_process_vm_writev
395378 common kcmp sys_kcmp
396379 common finit_module sys_finit_module
397380 common sched_setattr sys_sched_setattr
398381 common sched_getattr sys_sched_getattr
399382 common renameat2 sys_renameat2
400383 common seccomp sys_seccomp
401384 common getrandom sys_getrandom
402385 common memfd_create sys_memfd_create
403386 common bpf sys_bpf
404387 common execveat sys_execveat
405388 common userfaultfd sys_userfaultfd
406389 common membarrier sys_membarrier
407390 common mlock2 sys_mlock2
408391 common copy_file_range sys_copy_file_range
409392 common preadv2 sys_preadv2
410393 common pwritev2 sys_pwritev2
diff --git a/arch/arm/tools/syscallhdr.sh b/arch/arm/tools/syscallhdr.sh
new file mode 100644
index 000000000000..72d4b2e3bdec
--- /dev/null
+++ b/arch/arm/tools/syscallhdr.sh
@@ -0,0 +1,30 @@
1#!/bin/sh
2
3in="$1"
4out="$2"
5my_abis=`echo "($3)" | tr ',' '|'`
6prefix="$4"
7offset="$5"
8
9fileguard=_ASM_ARM_`basename "$out" | sed \
10 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
11 -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
12if echo $out | grep -q uapi; then
13 fileguard="_UAPI$fileguard"
14fi
15grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
16 echo "#ifndef ${fileguard}"
17 echo "#define ${fileguard} 1"
18 echo ""
19
20 while read nr abi name entry ; do
21 if [ -z "$offset" ]; then
22 echo "#define __NR_${prefix}${name} $nr"
23 else
24 echo "#define __NR_${prefix}${name} ($offset + $nr)"
25 fi
26 done
27
28 echo ""
29 echo "#endif /* ${fileguard} */"
30) > "$out"
diff --git a/arch/arm/tools/syscallnr.sh b/arch/arm/tools/syscallnr.sh
new file mode 100644
index 000000000000..d2971296469a
--- /dev/null
+++ b/arch/arm/tools/syscallnr.sh
@@ -0,0 +1,33 @@
1#!/bin/sh
2in="$1"
3out="$2"
4my_abis=`echo "($3)" | tr ',' '|'`
5align=1
6
7fileguard=_ASM_ARM_`basename "$out" | sed \
8 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
9 -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
10
11grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | tail -n1 | (
12 echo "#ifndef ${fileguard}
13#define ${fileguard} 1
14
15/*
16 * This needs to be greater than __NR_last_syscall+1 in order to account
17 * for the padding in the syscall table.
18 */
19"
20
21 while read nr abi name entry; do
22 nr=$(($nr + 1))
23 while [ "$(($nr / (256 * $align) ))" -gt 0 ]; do
24 align=$(( $align * 4 ))
25 done
26 nr=$(( ($nr + $align - 1) & ~($align - 1) ))
27 echo "/* aligned to $align */"
28 echo "#define __NR_syscalls $nr"
29 done
30
31 echo ""
32 echo "#endif /* ${fileguard} */"
33) > "$out"
diff --git a/arch/arm/tools/syscalltbl.sh b/arch/arm/tools/syscalltbl.sh
new file mode 100644
index 000000000000..5ca834545ed3
--- /dev/null
+++ b/arch/arm/tools/syscalltbl.sh
@@ -0,0 +1,21 @@
1#!/bin/sh
2in="$1"
3out="$2"
4my_abis=`echo "($3)" | tr ',' '|'`
5
6grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
7 while read nr abi name entry compat; do
8 if [ "$abi" = "eabi" -a -n "$compat" ]; then
9 echo "$in: error: a compat entry for an EABI syscall ($name) makes no sense" >&2
10 exit 1
11 fi
12
13 if [ -n "$entry" ]; then
14 if [ -z "$compat" ]; then
15 echo "NATIVE($nr, $entry)"
16 else
17 echo "COMPAT($nr, $entry, $compat)"
18 fi
19 fi
20 done
21) > "$out"