diff options
Diffstat (limited to 'arch/powerpc/kernel/systbl.S')
-rw-r--r-- | arch/powerpc/kernel/systbl.S | 321 |
1 files changed, 321 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S new file mode 100644 index 000000000000..65eaea91b499 --- /dev/null +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -0,0 +1,321 @@ | |||
1 | /* | ||
2 | * This file contains the table of syscall-handling functions. | ||
3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
4 | * | ||
5 | * Largely rewritten by Cort Dougan (cort@cs.nmt.edu) | ||
6 | * and Paul Mackerras. | ||
7 | * | ||
8 | * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com) | ||
9 | * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com) | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <asm/ppc_asm.h> | ||
19 | |||
20 | #ifdef CONFIG_PPC64 | ||
21 | #define SYSCALL(func) .llong .sys_##func,.sys_##func | ||
22 | #define COMPAT_SYS(func) .llong .sys_##func,.compat_sys_##func | ||
23 | #define PPC_SYS(func) .llong .ppc_##func,.ppc_##func | ||
24 | #define OLDSYS(func) .llong .sys_ni_syscall,.sys_ni_syscall | ||
25 | #define SYS32ONLY(func) .llong .sys_ni_syscall,.compat_sys_##func | ||
26 | #define SYSX(f, f3264, f32) .llong .f,.f3264 | ||
27 | #else | ||
28 | #define SYSCALL(func) .long sys_##func | ||
29 | #define COMPAT_SYS(func) .long sys_##func | ||
30 | #define PPC_SYS(func) .long ppc_##func | ||
31 | #define OLDSYS(func) .long sys_##func | ||
32 | #define SYS32ONLY(func) .long sys_##func | ||
33 | #define SYSX(f, f3264, f32) .long f32 | ||
34 | #endif | ||
35 | |||
36 | #ifdef CONFIG_PPC64 | ||
37 | #define sys_sigpending sys_ni_syscall | ||
38 | #define sys_old_getrlimit sys_ni_syscall | ||
39 | #else | ||
40 | #define ppc_rtas sys_ni_syscall | ||
41 | #endif | ||
42 | |||
43 | _GLOBAL(sys_call_table) | ||
44 | SYSCALL(restart_syscall) | ||
45 | SYSCALL(exit) | ||
46 | PPC_SYS(fork) | ||
47 | SYSCALL(read) | ||
48 | SYSCALL(write) | ||
49 | COMPAT_SYS(open) | ||
50 | SYSCALL(close) | ||
51 | COMPAT_SYS(waitpid) | ||
52 | COMPAT_SYS(creat) | ||
53 | SYSCALL(link) | ||
54 | SYSCALL(unlink) | ||
55 | COMPAT_SYS(execve) | ||
56 | SYSCALL(chdir) | ||
57 | SYSX(sys64_time,compat_sys_time,sys_time) | ||
58 | SYSCALL(mknod) | ||
59 | SYSCALL(chmod) | ||
60 | SYSCALL(lchown) | ||
61 | SYSCALL(ni_syscall) | ||
62 | OLDSYS(stat) | ||
63 | SYSX(sys_lseek,ppc32_lseek,sys_lseek) | ||
64 | SYSCALL(getpid) | ||
65 | COMPAT_SYS(mount) | ||
66 | SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount) | ||
67 | SYSCALL(setuid) | ||
68 | SYSCALL(getuid) | ||
69 | COMPAT_SYS(stime) | ||
70 | COMPAT_SYS(ptrace) | ||
71 | SYSCALL(alarm) | ||
72 | OLDSYS(fstat) | ||
73 | COMPAT_SYS(pause) | ||
74 | COMPAT_SYS(utime) | ||
75 | SYSCALL(ni_syscall) | ||
76 | SYSCALL(ni_syscall) | ||
77 | COMPAT_SYS(access) | ||
78 | COMPAT_SYS(nice) | ||
79 | SYSCALL(ni_syscall) | ||
80 | SYSCALL(sync) | ||
81 | COMPAT_SYS(kill) | ||
82 | SYSCALL(rename) | ||
83 | COMPAT_SYS(mkdir) | ||
84 | SYSCALL(rmdir) | ||
85 | SYSCALL(dup) | ||
86 | SYSCALL(pipe) | ||
87 | COMPAT_SYS(times) | ||
88 | SYSCALL(ni_syscall) | ||
89 | SYSCALL(brk) | ||
90 | SYSCALL(setgid) | ||
91 | SYSCALL(getgid) | ||
92 | SYSCALL(signal) | ||
93 | SYSCALL(geteuid) | ||
94 | SYSCALL(getegid) | ||
95 | SYSCALL(acct) | ||
96 | SYSCALL(umount) | ||
97 | SYSCALL(ni_syscall) | ||
98 | COMPAT_SYS(ioctl) | ||
99 | COMPAT_SYS(fcntl) | ||
100 | SYSCALL(ni_syscall) | ||
101 | COMPAT_SYS(setpgid) | ||
102 | SYSCALL(ni_syscall) | ||
103 | SYSX(sys_ni_syscall,sys_olduname, sys_olduname) | ||
104 | COMPAT_SYS(umask) | ||
105 | SYSCALL(chroot) | ||
106 | SYSCALL(ustat) | ||
107 | SYSCALL(dup2) | ||
108 | SYSCALL(getppid) | ||
109 | SYSCALL(getpgrp) | ||
110 | SYSCALL(setsid) | ||
111 | SYS32ONLY(sigaction) | ||
112 | SYSCALL(sgetmask) | ||
113 | COMPAT_SYS(ssetmask) | ||
114 | SYSCALL(setreuid) | ||
115 | SYSCALL(setregid) | ||
116 | SYSX(sys_ni_syscall,ppc32_sigsuspend,ppc_sigsuspend) | ||
117 | COMPAT_SYS(sigpending) | ||
118 | COMPAT_SYS(sethostname) | ||
119 | COMPAT_SYS(setrlimit) | ||
120 | COMPAT_SYS(old_getrlimit) | ||
121 | COMPAT_SYS(getrusage) | ||
122 | COMPAT_SYS(gettimeofday) | ||
123 | COMPAT_SYS(settimeofday) | ||
124 | COMPAT_SYS(getgroups) | ||
125 | COMPAT_SYS(setgroups) | ||
126 | SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select) | ||
127 | SYSCALL(symlink) | ||
128 | OLDSYS(lstat) | ||
129 | COMPAT_SYS(readlink) | ||
130 | SYSCALL(uselib) | ||
131 | SYSCALL(swapon) | ||
132 | SYSCALL(reboot) | ||
133 | SYSX(sys_ni_syscall,old32_readdir,old_readdir) | ||
134 | SYSCALL(mmap) | ||
135 | SYSCALL(munmap) | ||
136 | SYSCALL(truncate) | ||
137 | SYSCALL(ftruncate) | ||
138 | SYSCALL(fchmod) | ||
139 | SYSCALL(fchown) | ||
140 | COMPAT_SYS(getpriority) | ||
141 | COMPAT_SYS(setpriority) | ||
142 | SYSCALL(ni_syscall) | ||
143 | COMPAT_SYS(statfs) | ||
144 | COMPAT_SYS(fstatfs) | ||
145 | SYSCALL(ni_syscall) | ||
146 | COMPAT_SYS(socketcall) | ||
147 | COMPAT_SYS(syslog) | ||
148 | COMPAT_SYS(setitimer) | ||
149 | COMPAT_SYS(getitimer) | ||
150 | COMPAT_SYS(newstat) | ||
151 | COMPAT_SYS(newlstat) | ||
152 | COMPAT_SYS(newfstat) | ||
153 | SYSX(sys_ni_syscall,sys_uname,sys_uname) | ||
154 | SYSCALL(ni_syscall) | ||
155 | SYSCALL(vhangup) | ||
156 | SYSCALL(ni_syscall) | ||
157 | SYSCALL(ni_syscall) | ||
158 | COMPAT_SYS(wait4) | ||
159 | SYSCALL(swapoff) | ||
160 | COMPAT_SYS(sysinfo) | ||
161 | COMPAT_SYS(ipc) | ||
162 | SYSCALL(fsync) | ||
163 | SYSX(sys_ni_syscall,ppc32_sigreturn,sys_sigreturn) | ||
164 | PPC_SYS(clone) | ||
165 | COMPAT_SYS(setdomainname) | ||
166 | PPC_SYS(newuname) | ||
167 | SYSCALL(ni_syscall) | ||
168 | COMPAT_SYS(adjtimex) | ||
169 | SYSCALL(mprotect) | ||
170 | SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask) | ||
171 | SYSCALL(ni_syscall) | ||
172 | SYSCALL(init_module) | ||
173 | SYSCALL(delete_module) | ||
174 | SYSCALL(ni_syscall) | ||
175 | SYSCALL(quotactl) | ||
176 | COMPAT_SYS(getpgid) | ||
177 | SYSCALL(fchdir) | ||
178 | SYSCALL(bdflush) | ||
179 | COMPAT_SYS(sysfs) | ||
180 | SYSX(ppc64_personality,ppc64_personality,sys_personality) | ||
181 | SYSCALL(ni_syscall) | ||
182 | SYSCALL(setfsuid) | ||
183 | SYSCALL(setfsgid) | ||
184 | SYSCALL(llseek) | ||
185 | COMPAT_SYS(getdents) | ||
186 | SYSX(sys_select,ppc32_select,ppc_select) | ||
187 | SYSCALL(flock) | ||
188 | SYSCALL(msync) | ||
189 | COMPAT_SYS(readv) | ||
190 | COMPAT_SYS(writev) | ||
191 | COMPAT_SYS(getsid) | ||
192 | SYSCALL(fdatasync) | ||
193 | COMPAT_SYS(sysctl) | ||
194 | SYSCALL(mlock) | ||
195 | SYSCALL(munlock) | ||
196 | SYSCALL(mlockall) | ||
197 | SYSCALL(munlockall) | ||
198 | COMPAT_SYS(sched_setparam) | ||
199 | COMPAT_SYS(sched_getparam) | ||
200 | COMPAT_SYS(sched_setscheduler) | ||
201 | COMPAT_SYS(sched_getscheduler) | ||
202 | SYSCALL(sched_yield) | ||
203 | COMPAT_SYS(sched_get_priority_max) | ||
204 | COMPAT_SYS(sched_get_priority_min) | ||
205 | COMPAT_SYS(sched_rr_get_interval) | ||
206 | COMPAT_SYS(nanosleep) | ||
207 | SYSCALL(mremap) | ||
208 | SYSCALL(setresuid) | ||
209 | SYSCALL(getresuid) | ||
210 | SYSCALL(ni_syscall) | ||
211 | SYSCALL(poll) | ||
212 | COMPAT_SYS(nfsservctl) | ||
213 | SYSCALL(setresgid) | ||
214 | SYSCALL(getresgid) | ||
215 | COMPAT_SYS(prctl) | ||
216 | SYSX(ppc64_rt_sigreturn,ppc32_rt_sigreturn,sys_rt_sigreturn) | ||
217 | COMPAT_SYS(rt_sigaction) | ||
218 | COMPAT_SYS(rt_sigprocmask) | ||
219 | COMPAT_SYS(rt_sigpending) | ||
220 | COMPAT_SYS(rt_sigtimedwait) | ||
221 | COMPAT_SYS(rt_sigqueueinfo) | ||
222 | SYSX(ppc64_rt_sigsuspend,ppc32_rt_sigsuspend,ppc_rt_sigsuspend) | ||
223 | COMPAT_SYS(pread64) | ||
224 | COMPAT_SYS(pwrite64) | ||
225 | SYSCALL(chown) | ||
226 | SYSCALL(getcwd) | ||
227 | SYSCALL(capget) | ||
228 | SYSCALL(capset) | ||
229 | COMPAT_SYS(sigaltstack) | ||
230 | SYSX(sys_sendfile64,compat_sys_sendfile,sys_sendfile) | ||
231 | SYSCALL(ni_syscall) | ||
232 | SYSCALL(ni_syscall) | ||
233 | PPC_SYS(vfork) | ||
234 | COMPAT_SYS(getrlimit) | ||
235 | COMPAT_SYS(readahead) | ||
236 | SYS32ONLY(mmap2) | ||
237 | SYS32ONLY(truncate64) | ||
238 | SYS32ONLY(ftruncate64) | ||
239 | SYSX(sys_ni_syscall,sys_stat64,sys_stat64) | ||
240 | SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64) | ||
241 | SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64) | ||
242 | COMPAT_SYS(pciconfig_read) | ||
243 | COMPAT_SYS(pciconfig_write) | ||
244 | COMPAT_SYS(pciconfig_iobase) | ||
245 | SYSCALL(ni_syscall) | ||
246 | SYSCALL(getdents64) | ||
247 | SYSCALL(pivot_root) | ||
248 | SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64) | ||
249 | SYSCALL(madvise) | ||
250 | SYSCALL(mincore) | ||
251 | SYSCALL(gettid) | ||
252 | SYSCALL(tkill) | ||
253 | SYSCALL(setxattr) | ||
254 | SYSCALL(lsetxattr) | ||
255 | SYSCALL(fsetxattr) | ||
256 | SYSCALL(getxattr) | ||
257 | SYSCALL(lgetxattr) | ||
258 | SYSCALL(fgetxattr) | ||
259 | SYSCALL(listxattr) | ||
260 | SYSCALL(llistxattr) | ||
261 | SYSCALL(flistxattr) | ||
262 | SYSCALL(removexattr) | ||
263 | SYSCALL(lremovexattr) | ||
264 | SYSCALL(fremovexattr) | ||
265 | COMPAT_SYS(futex) | ||
266 | COMPAT_SYS(sched_setaffinity) | ||
267 | COMPAT_SYS(sched_getaffinity) | ||
268 | SYSCALL(ni_syscall) | ||
269 | SYSCALL(ni_syscall) | ||
270 | SYS32ONLY(sendfile64) | ||
271 | COMPAT_SYS(io_setup) | ||
272 | SYSCALL(io_destroy) | ||
273 | COMPAT_SYS(io_getevents) | ||
274 | COMPAT_SYS(io_submit) | ||
275 | SYSCALL(io_cancel) | ||
276 | SYSCALL(set_tid_address) | ||
277 | SYSX(sys_fadvise64,ppc32_fadvise64,sys_fadvise64) | ||
278 | SYSCALL(exit_group) | ||
279 | SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie) | ||
280 | SYSCALL(epoll_create) | ||
281 | SYSCALL(epoll_ctl) | ||
282 | SYSCALL(epoll_wait) | ||
283 | SYSCALL(remap_file_pages) | ||
284 | SYSX(sys_timer_create,ppc32_timer_create,sys_timer_create) | ||
285 | COMPAT_SYS(timer_settime) | ||
286 | COMPAT_SYS(timer_gettime) | ||
287 | SYSCALL(timer_getoverrun) | ||
288 | SYSCALL(timer_delete) | ||
289 | COMPAT_SYS(clock_settime) | ||
290 | COMPAT_SYS(clock_gettime) | ||
291 | COMPAT_SYS(clock_getres) | ||
292 | COMPAT_SYS(clock_nanosleep) | ||
293 | SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext) | ||
294 | COMPAT_SYS(tgkill) | ||
295 | COMPAT_SYS(utimes) | ||
296 | COMPAT_SYS(statfs64) | ||
297 | COMPAT_SYS(fstatfs64) | ||
298 | SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64) | ||
299 | PPC_SYS(rtas) | ||
300 | OLDSYS(debug_setcontext) | ||
301 | SYSCALL(ni_syscall) | ||
302 | SYSCALL(ni_syscall) | ||
303 | COMPAT_SYS(mbind) | ||
304 | COMPAT_SYS(get_mempolicy) | ||
305 | COMPAT_SYS(set_mempolicy) | ||
306 | COMPAT_SYS(mq_open) | ||
307 | SYSCALL(mq_unlink) | ||
308 | COMPAT_SYS(mq_timedsend) | ||
309 | COMPAT_SYS(mq_timedreceive) | ||
310 | COMPAT_SYS(mq_notify) | ||
311 | COMPAT_SYS(mq_getsetattr) | ||
312 | COMPAT_SYS(kexec_load) | ||
313 | COMPAT_SYS(add_key) | ||
314 | COMPAT_SYS(request_key) | ||
315 | COMPAT_SYS(keyctl) | ||
316 | COMPAT_SYS(waitid) | ||
317 | COMPAT_SYS(ioprio_set) | ||
318 | COMPAT_SYS(ioprio_get) | ||
319 | SYSCALL(inotify_init) | ||
320 | SYSCALL(inotify_add_watch) | ||
321 | SYSCALL(inotify_rm_watch) | ||