Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
[linux-2.6] / arch / powerpc / kernel / systbl.S
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 #endif
40
41 _GLOBAL(sys_call_table)
42 SYSCALL(restart_syscall)
43 SYSCALL(exit)
44 PPC_SYS(fork)
45 SYSCALL(read)
46 SYSCALL(write)
47 COMPAT_SYS(open)
48 SYSCALL(close)
49 COMPAT_SYS(waitpid)
50 COMPAT_SYS(creat)
51 SYSCALL(link)
52 SYSCALL(unlink)
53 COMPAT_SYS(execve)
54 SYSCALL(chdir)
55 COMPAT_SYS(time)
56 SYSCALL(mknod)
57 SYSCALL(chmod)
58 SYSCALL(lchown)
59 SYSCALL(ni_syscall)
60 OLDSYS(stat)
61 SYSX(sys_lseek,ppc32_lseek,sys_lseek)
62 SYSCALL(getpid)
63 COMPAT_SYS(mount)
64 SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
65 SYSCALL(setuid)
66 SYSCALL(getuid)
67 COMPAT_SYS(stime)
68 COMPAT_SYS(ptrace)
69 SYSCALL(alarm)
70 OLDSYS(fstat)
71 COMPAT_SYS(pause)
72 COMPAT_SYS(utime)
73 SYSCALL(ni_syscall)
74 SYSCALL(ni_syscall)
75 COMPAT_SYS(access)
76 COMPAT_SYS(nice)
77 SYSCALL(ni_syscall)
78 SYSCALL(sync)
79 COMPAT_SYS(kill)
80 SYSCALL(rename)
81 COMPAT_SYS(mkdir)
82 SYSCALL(rmdir)
83 SYSCALL(dup)
84 SYSCALL(pipe)
85 COMPAT_SYS(times)
86 SYSCALL(ni_syscall)
87 SYSCALL(brk)
88 SYSCALL(setgid)
89 SYSCALL(getgid)
90 SYSCALL(signal)
91 SYSCALL(geteuid)
92 SYSCALL(getegid)
93 SYSCALL(acct)
94 SYSCALL(umount)
95 SYSCALL(ni_syscall)
96 COMPAT_SYS(ioctl)
97 COMPAT_SYS(fcntl)
98 SYSCALL(ni_syscall)
99 COMPAT_SYS(setpgid)
100 SYSCALL(ni_syscall)
101 SYSX(sys_ni_syscall,sys_olduname, sys_olduname)
102 COMPAT_SYS(umask)
103 SYSCALL(chroot)
104 SYSCALL(ustat)
105 SYSCALL(dup2)
106 SYSCALL(getppid)
107 SYSCALL(getpgrp)
108 SYSCALL(setsid)
109 SYS32ONLY(sigaction)
110 SYSCALL(sgetmask)
111 COMPAT_SYS(ssetmask)
112 SYSCALL(setreuid)
113 SYSCALL(setregid)
114 SYS32ONLY(sigsuspend)
115 COMPAT_SYS(sigpending)
116 COMPAT_SYS(sethostname)
117 COMPAT_SYS(setrlimit)
118 COMPAT_SYS(old_getrlimit)
119 COMPAT_SYS(getrusage)
120 COMPAT_SYS(gettimeofday)
121 COMPAT_SYS(settimeofday)
122 COMPAT_SYS(getgroups)
123 COMPAT_SYS(setgroups)
124 SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
125 SYSCALL(symlink)
126 OLDSYS(lstat)
127 COMPAT_SYS(readlink)
128 SYSCALL(uselib)
129 SYSCALL(swapon)
130 SYSCALL(reboot)
131 SYSX(sys_ni_syscall,old32_readdir,old_readdir)
132 SYSCALL(mmap)
133 SYSCALL(munmap)
134 SYSCALL(truncate)
135 SYSCALL(ftruncate)
136 SYSCALL(fchmod)
137 SYSCALL(fchown)
138 COMPAT_SYS(getpriority)
139 COMPAT_SYS(setpriority)
140 SYSCALL(ni_syscall)
141 COMPAT_SYS(statfs)
142 COMPAT_SYS(fstatfs)
143 SYSCALL(ni_syscall)
144 COMPAT_SYS(socketcall)
145 COMPAT_SYS(syslog)
146 COMPAT_SYS(setitimer)
147 COMPAT_SYS(getitimer)
148 COMPAT_SYS(newstat)
149 COMPAT_SYS(newlstat)
150 COMPAT_SYS(newfstat)
151 SYSX(sys_ni_syscall,sys_uname,sys_uname)
152 SYSCALL(ni_syscall)
153 SYSCALL(vhangup)
154 SYSCALL(ni_syscall)
155 SYSCALL(ni_syscall)
156 COMPAT_SYS(wait4)
157 SYSCALL(swapoff)
158 COMPAT_SYS(sysinfo)
159 COMPAT_SYS(ipc)
160 SYSCALL(fsync)
161 SYS32ONLY(sigreturn)
162 PPC_SYS(clone)
163 COMPAT_SYS(setdomainname)
164 PPC_SYS(newuname)
165 SYSCALL(ni_syscall)
166 COMPAT_SYS(adjtimex)
167 SYSCALL(mprotect)
168 SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
169 SYSCALL(ni_syscall)
170 SYSCALL(init_module)
171 SYSCALL(delete_module)
172 SYSCALL(ni_syscall)
173 SYSCALL(quotactl)
174 COMPAT_SYS(getpgid)
175 SYSCALL(fchdir)
176 SYSCALL(bdflush)
177 COMPAT_SYS(sysfs)
178 SYSX(ppc64_personality,ppc64_personality,sys_personality)
179 SYSCALL(ni_syscall)
180 SYSCALL(setfsuid)
181 SYSCALL(setfsgid)
182 SYSCALL(llseek)
183 COMPAT_SYS(getdents)
184 SYSX(sys_select,ppc32_select,ppc_select)
185 SYSCALL(flock)
186 SYSCALL(msync)
187 COMPAT_SYS(readv)
188 COMPAT_SYS(writev)
189 COMPAT_SYS(getsid)
190 SYSCALL(fdatasync)
191 COMPAT_SYS(sysctl)
192 SYSCALL(mlock)
193 SYSCALL(munlock)
194 SYSCALL(mlockall)
195 SYSCALL(munlockall)
196 COMPAT_SYS(sched_setparam)
197 COMPAT_SYS(sched_getparam)
198 COMPAT_SYS(sched_setscheduler)
199 COMPAT_SYS(sched_getscheduler)
200 SYSCALL(sched_yield)
201 COMPAT_SYS(sched_get_priority_max)
202 COMPAT_SYS(sched_get_priority_min)
203 COMPAT_SYS(sched_rr_get_interval)
204 COMPAT_SYS(nanosleep)
205 SYSCALL(mremap)
206 SYSCALL(setresuid)
207 SYSCALL(getresuid)
208 SYSCALL(ni_syscall)
209 SYSCALL(poll)
210 COMPAT_SYS(nfsservctl)
211 SYSCALL(setresgid)
212 SYSCALL(getresgid)
213 COMPAT_SYS(prctl)
214 COMPAT_SYS(rt_sigreturn)
215 COMPAT_SYS(rt_sigaction)
216 COMPAT_SYS(rt_sigprocmask)
217 COMPAT_SYS(rt_sigpending)
218 COMPAT_SYS(rt_sigtimedwait)
219 COMPAT_SYS(rt_sigqueueinfo)
220 COMPAT_SYS(rt_sigsuspend)
221 COMPAT_SYS(pread64)
222 COMPAT_SYS(pwrite64)
223 SYSCALL(chown)
224 SYSCALL(getcwd)
225 SYSCALL(capget)
226 SYSCALL(capset)
227 COMPAT_SYS(sigaltstack)
228 SYSX(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
229 SYSCALL(ni_syscall)
230 SYSCALL(ni_syscall)
231 PPC_SYS(vfork)
232 COMPAT_SYS(getrlimit)
233 COMPAT_SYS(readahead)
234 SYS32ONLY(mmap2)
235 SYS32ONLY(truncate64)
236 SYS32ONLY(ftruncate64)
237 SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
238 SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
239 SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
240 SYSCALL(pciconfig_read)
241 SYSCALL(pciconfig_write)
242 SYSCALL(pciconfig_iobase)
243 SYSCALL(ni_syscall)
244 SYSCALL(getdents64)
245 SYSCALL(pivot_root)
246 SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
247 SYSCALL(madvise)
248 SYSCALL(mincore)
249 SYSCALL(gettid)
250 SYSCALL(tkill)
251 SYSCALL(setxattr)
252 SYSCALL(lsetxattr)
253 SYSCALL(fsetxattr)
254 SYSCALL(getxattr)
255 SYSCALL(lgetxattr)
256 SYSCALL(fgetxattr)
257 SYSCALL(listxattr)
258 SYSCALL(llistxattr)
259 SYSCALL(flistxattr)
260 SYSCALL(removexattr)
261 SYSCALL(lremovexattr)
262 SYSCALL(fremovexattr)
263 COMPAT_SYS(futex)
264 COMPAT_SYS(sched_setaffinity)
265 COMPAT_SYS(sched_getaffinity)
266 SYSCALL(ni_syscall)
267 SYSCALL(ni_syscall)
268 SYS32ONLY(sendfile64)
269 COMPAT_SYS(io_setup)
270 SYSCALL(io_destroy)
271 COMPAT_SYS(io_getevents)
272 COMPAT_SYS(io_submit)
273 SYSCALL(io_cancel)
274 SYSCALL(set_tid_address)
275 SYSX(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
276 SYSCALL(exit_group)
277 SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie)
278 SYSCALL(epoll_create)
279 SYSCALL(epoll_ctl)
280 SYSCALL(epoll_wait)
281 SYSCALL(remap_file_pages)
282 SYSX(sys_timer_create,compat_sys_timer_create,sys_timer_create)
283 COMPAT_SYS(timer_settime)
284 COMPAT_SYS(timer_gettime)
285 SYSCALL(timer_getoverrun)
286 SYSCALL(timer_delete)
287 COMPAT_SYS(clock_settime)
288 COMPAT_SYS(clock_gettime)
289 COMPAT_SYS(clock_getres)
290 COMPAT_SYS(clock_nanosleep)
291 COMPAT_SYS(swapcontext)
292 COMPAT_SYS(tgkill)
293 COMPAT_SYS(utimes)
294 COMPAT_SYS(statfs64)
295 COMPAT_SYS(fstatfs64)
296 SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
297 PPC_SYS(rtas)
298 OLDSYS(debug_setcontext)
299 SYSCALL(ni_syscall)
300 SYSCALL(ni_syscall)
301 COMPAT_SYS(mbind)
302 COMPAT_SYS(get_mempolicy)
303 COMPAT_SYS(set_mempolicy)
304 COMPAT_SYS(mq_open)
305 SYSCALL(mq_unlink)
306 COMPAT_SYS(mq_timedsend)
307 COMPAT_SYS(mq_timedreceive)
308 COMPAT_SYS(mq_notify)
309 COMPAT_SYS(mq_getsetattr)
310 COMPAT_SYS(kexec_load)
311 COMPAT_SYS(add_key)
312 COMPAT_SYS(request_key)
313 COMPAT_SYS(keyctl)
314 COMPAT_SYS(waitid)
315 COMPAT_SYS(ioprio_set)
316 COMPAT_SYS(ioprio_get)
317 SYSCALL(inotify_init)
318 SYSCALL(inotify_add_watch)
319 SYSCALL(inotify_rm_watch)
320 SYSCALL(spu_run)
321 SYSCALL(spu_create)
322 COMPAT_SYS(pselect6)
323 COMPAT_SYS(ppoll)
324 SYSCALL(unshare)