aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/systbl.S
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-10 08:36:14 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-10 08:36:14 -0400
commit9994a33865f4d55c44c9731c01e1f891543278de (patch)
tree77d8fe580493dbf9ce1820a703c482fba291b6b9 /arch/powerpc/kernel/systbl.S
parent06d67d54741a5bfefa31945ef195dfa748c29025 (diff)
powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S
The system call table has been consolidated into systbl.S. We have separate 32-bit and 64-bit versions of entry.S and misc.S since the code is mostly sufficiently different to be not worth merging. There are some common bits that will be extracted in future. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/systbl.S')
-rw-r--r--arch/powerpc/kernel/systbl.S323
1 files changed, 323 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
new file mode 100644
index 000000000000..82d1fedb441c
--- /dev/null
+++ b/arch/powerpc/kernel/systbl.S
@@ -0,0 +1,323 @@
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 SYSCALL32(func) .llong .sys_##func,.sys32_##func
23#define COMPAT_SYS(func) .llong .sys_##func,.compat_sys_##func
24#define PPC_SYS(func) .llong .ppc_##func,.ppc_##func
25#define OLDSYS(func) .llong .sys_ni_syscall,.sys_ni_syscall
26#define SYS32ONLY(func) .llong .sys_ni_syscall,.sys32_##func
27#define SYSX(f, f3264, f32) .llong .f,.f3264
28#else
29#define SYSCALL(func) .long sys_##func
30#define SYSCALL32(func) .long sys_##func
31#define COMPAT_SYS(func) .long sys_##func
32#define PPC_SYS(func) .long ppc_##func
33#define OLDSYS(func) .long sys_##func
34#define SYS32ONLY(func) .long sys_##func
35#define SYSX(f, f3264, f32) .long f32
36#endif
37
38#ifdef CONFIG_PPC64
39#define sys_sigpending sys_ni_syscall
40#define sys_old_getrlimit sys_ni_syscall
41#else
42#define ppc_rtas sys_ni_syscall
43#endif
44
45_GLOBAL(sys_call_table)
46SYSCALL(restart_syscall)
47SYSCALL(exit)
48PPC_SYS(fork)
49SYSCALL(read)
50SYSCALL(write)
51COMPAT_SYS(open)
52SYSCALL(close)
53SYSCALL32(waitpid)
54SYSCALL32(creat)
55SYSCALL(link)
56SYSCALL(unlink)
57SYSCALL32(execve)
58SYSCALL(chdir)
59SYSX(sys64_time,compat_sys_time,sys_time)
60SYSCALL(mknod)
61SYSCALL(chmod)
62SYSCALL(lchown)
63SYSCALL(ni_syscall)
64OLDSYS(stat)
65SYSX(sys_lseek,ppc32_lseek,sys_lseek)
66SYSCALL(getpid)
67COMPAT_SYS(mount)
68SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
69SYSCALL(setuid)
70SYSCALL(getuid)
71COMPAT_SYS(stime)
72SYSCALL32(ptrace)
73SYSCALL(alarm)
74OLDSYS(fstat)
75SYSCALL32(pause)
76COMPAT_SYS(utime)
77SYSCALL(ni_syscall)
78SYSCALL(ni_syscall)
79SYSCALL32(access)
80SYSCALL32(nice)
81SYSCALL(ni_syscall)
82SYSCALL(sync)
83SYSCALL32(kill)
84SYSCALL(rename)
85SYSCALL32(mkdir)
86SYSCALL(rmdir)
87SYSCALL(dup)
88SYSCALL(pipe)
89COMPAT_SYS(times)
90SYSCALL(ni_syscall)
91SYSCALL(brk)
92SYSCALL(setgid)
93SYSCALL(getgid)
94SYSCALL(signal)
95SYSCALL(geteuid)
96SYSCALL(getegid)
97SYSCALL(acct)
98SYSCALL(umount)
99SYSCALL(ni_syscall)
100COMPAT_SYS(ioctl)
101COMPAT_SYS(fcntl)
102SYSCALL(ni_syscall)
103SYSCALL32(setpgid)
104SYSCALL(ni_syscall)
105SYS32ONLY(olduname)
106SYSCALL32(umask)
107SYSCALL(chroot)
108SYSCALL(ustat)
109SYSCALL(dup2)
110SYSCALL(getppid)
111SYSCALL(getpgrp)
112SYSCALL(setsid)
113SYS32ONLY(sigaction)
114SYSCALL(sgetmask)
115SYSCALL32(ssetmask)
116SYSCALL(setreuid)
117SYSCALL(setregid)
118SYSX(sys_ni_syscall,ppc32_sigsuspend,ppc_sigsuspend)
119COMPAT_SYS(sigpending)
120SYSCALL32(sethostname)
121COMPAT_SYS(setrlimit)
122COMPAT_SYS(old_getrlimit)
123COMPAT_SYS(getrusage)
124SYSCALL32(gettimeofday)
125SYSCALL32(settimeofday)
126SYSCALL32(getgroups)
127SYSCALL32(setgroups)
128SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
129SYSCALL(symlink)
130OLDSYS(lstat)
131SYSCALL32(readlink)
132SYSCALL(uselib)
133SYSCALL(swapon)
134SYSCALL(reboot)
135SYSX(sys_ni_syscall,old32_readdir,old_readdir)
136SYSCALL(mmap)
137SYSCALL(munmap)
138SYSCALL(truncate)
139SYSCALL(ftruncate)
140SYSCALL(fchmod)
141SYSCALL(fchown)
142SYSCALL32(getpriority)
143SYSCALL32(setpriority)
144SYSCALL(ni_syscall)
145COMPAT_SYS(statfs)
146COMPAT_SYS(fstatfs)
147SYSCALL(ni_syscall)
148COMPAT_SYS(socketcall)
149SYSCALL32(syslog)
150COMPAT_SYS(setitimer)
151COMPAT_SYS(getitimer)
152COMPAT_SYS(newstat)
153COMPAT_SYS(newlstat)
154COMPAT_SYS(newfstat)
155SYSX(sys_ni_syscall,sys32_uname,sys_uname)
156SYSCALL(ni_syscall)
157SYSCALL(vhangup)
158SYSCALL(ni_syscall)
159SYSCALL(ni_syscall)
160COMPAT_SYS(wait4)
161SYSCALL(swapoff)
162SYSCALL32(sysinfo)
163SYSCALL32(ipc)
164SYSCALL(fsync)
165SYSX(sys_ni_syscall,ppc32_sigreturn,sys_sigreturn)
166PPC_SYS(clone)
167SYSCALL32(setdomainname)
168SYSX(ppc64_newuname,ppc64_newuname,sys_newuname)
169SYSCALL(ni_syscall)
170SYSCALL32(adjtimex)
171SYSCALL(mprotect)
172SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
173SYSCALL(ni_syscall)
174SYSCALL(init_module)
175SYSCALL(delete_module)
176SYSCALL(ni_syscall)
177SYSCALL(quotactl)
178SYSCALL32(getpgid)
179SYSCALL(fchdir)
180SYSCALL(bdflush)
181SYSCALL32(sysfs)
182SYSX(ppc64_personality,ppc64_personality,sys_personality)
183SYSCALL(ni_syscall)
184SYSCALL(setfsuid)
185SYSCALL(setfsgid)
186SYSCALL(llseek)
187SYSCALL32(getdents)
188SYSX(sys_select,ppc32_select,ppc_select)
189SYSCALL(flock)
190SYSCALL(msync)
191COMPAT_SYS(readv)
192COMPAT_SYS(writev)
193SYSCALL32(getsid)
194SYSCALL(fdatasync)
195SYSCALL32(sysctl)
196SYSCALL(mlock)
197SYSCALL(munlock)
198SYSCALL(mlockall)
199SYSCALL(munlockall)
200SYSCALL32(sched_setparam)
201SYSCALL32(sched_getparam)
202SYSCALL32(sched_setscheduler)
203SYSCALL32(sched_getscheduler)
204SYSCALL(sched_yield)
205SYSCALL32(sched_get_priority_max)
206SYSCALL32(sched_get_priority_min)
207SYSCALL32(sched_rr_get_interval)
208COMPAT_SYS(nanosleep)
209SYSCALL(mremap)
210SYSCALL(setresuid)
211SYSCALL(getresuid)
212SYSCALL(ni_syscall)
213SYSCALL(poll)
214COMPAT_SYS(nfsservctl)
215SYSCALL(setresgid)
216SYSCALL(getresgid)
217SYSCALL32(prctl)
218SYSX(ppc64_rt_sigreturn,ppc32_rt_sigreturn,sys_rt_sigreturn)
219SYSCALL32(rt_sigaction)
220SYSCALL32(rt_sigprocmask)
221SYSCALL32(rt_sigpending)
222COMPAT_SYS(rt_sigtimedwait)
223SYSCALL32(rt_sigqueueinfo)
224SYSX(ppc64_rt_sigsuspend,ppc32_rt_sigsuspend,ppc_rt_sigsuspend)
225SYSCALL32(pread64)
226SYSCALL32(pwrite64)
227SYSCALL(chown)
228SYSCALL(getcwd)
229SYSCALL(capget)
230SYSCALL(capset)
231SYSCALL32(sigaltstack)
232SYSX(sys_sendfile64,sys32_sendfile,sys_sendfile)
233SYSCALL(ni_syscall)
234SYSCALL(ni_syscall)
235PPC_SYS(vfork)
236COMPAT_SYS(getrlimit)
237SYSCALL32(readahead)
238SYS32ONLY(mmap2)
239SYS32ONLY(truncate64)
240SYS32ONLY(ftruncate64)
241SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
242SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
243SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
244SYSCALL32(pciconfig_read)
245SYSCALL32(pciconfig_write)
246SYSCALL32(pciconfig_iobase)
247SYSCALL(ni_syscall)
248SYSCALL(getdents64)
249SYSCALL(pivot_root)
250SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
251SYSCALL(madvise)
252SYSCALL(mincore)
253SYSCALL(gettid)
254SYSCALL(tkill)
255SYSCALL(setxattr)
256SYSCALL(lsetxattr)
257SYSCALL(fsetxattr)
258SYSCALL(getxattr)
259SYSCALL(lgetxattr)
260SYSCALL(fgetxattr)
261SYSCALL(listxattr)
262SYSCALL(llistxattr)
263SYSCALL(flistxattr)
264SYSCALL(removexattr)
265SYSCALL(lremovexattr)
266SYSCALL(fremovexattr)
267COMPAT_SYS(futex)
268COMPAT_SYS(sched_setaffinity)
269COMPAT_SYS(sched_getaffinity)
270SYSCALL(ni_syscall)
271SYSCALL(ni_syscall)
272SYS32ONLY(sendfile64)
273COMPAT_SYS(io_setup)
274SYSCALL(io_destroy)
275COMPAT_SYS(io_getevents)
276COMPAT_SYS(io_submit)
277SYSCALL(io_cancel)
278SYSCALL(set_tid_address)
279SYSX(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
280SYSCALL(exit_group)
281SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie)
282SYSCALL(epoll_create)
283SYSCALL(epoll_ctl)
284SYSCALL(epoll_wait)
285SYSCALL(remap_file_pages)
286SYSX(sys_timer_create,ppc32_timer_create,sys_timer_create)
287COMPAT_SYS(timer_settime)
288COMPAT_SYS(timer_gettime)
289SYSCALL(timer_getoverrun)
290SYSCALL(timer_delete)
291COMPAT_SYS(clock_settime)
292COMPAT_SYS(clock_gettime)
293COMPAT_SYS(clock_getres)
294COMPAT_SYS(clock_nanosleep)
295SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
296SYSCALL32(tgkill)
297SYSCALL32(utimes)
298COMPAT_SYS(statfs64)
299COMPAT_SYS(fstatfs64)
300SYSX(sys_ni_syscall, ppc32_fadvise64_64, sys_fadvise64_64)
301PPC_SYS(rtas)
302OLDSYS(debug_setcontext)
303SYSCALL(ni_syscall)
304SYSCALL(ni_syscall)
305COMPAT_SYS(mbind)
306COMPAT_SYS(get_mempolicy)
307COMPAT_SYS(set_mempolicy)
308COMPAT_SYS(mq_open)
309SYSCALL(mq_unlink)
310COMPAT_SYS(mq_timedsend)
311COMPAT_SYS(mq_timedreceive)
312COMPAT_SYS(mq_notify)
313COMPAT_SYS(mq_getsetattr)
314COMPAT_SYS(kexec_load)
315SYSCALL32(add_key)
316SYSCALL32(request_key)
317COMPAT_SYS(keyctl)
318COMPAT_SYS(waitid)
319SYSCALL32(ioprio_set)
320SYSCALL32(ioprio_get)
321SYSCALL(inotify_init)
322SYSCALL(inotify_add_watch)
323SYSCALL(inotify_rm_watch)