aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2006-06-19 16:45:04 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-21 01:01:32 -0400
commit72abd54035a3d71fd8f02596e659257e8bba16ca (patch)
tree006ddd84ad8d7290bbadccd15633be0d36737c25
parent868ea0c9256b658b14603e1ad7361b81b92ccacd (diff)
[POWERPC] Unify ppc syscall tables
Avoid duplication of the syscall table for the cell platform. Based on an idea from David Woodhouse. Signed-off-by: Andreas Schwab <schwab@suse.de> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/systbl.S311
-rw-r--r--arch/powerpc/platforms/cell/spu_callbacks.c314
-rw-r--r--include/asm-powerpc/systbl.h306
3 files changed, 324 insertions, 607 deletions
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index 26ed1f5ef16..ee75ccf1a80 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -32,6 +32,10 @@
32#define SYS32ONLY(func) .long sys_##func 32#define SYS32ONLY(func) .long sys_##func
33#define SYSX(f, f3264, f32) .long f32 33#define SYSX(f, f3264, f32) .long f32
34#endif 34#endif
35#define SYSCALL_SPU(func) SYSCALL(func)
36#define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
37#define PPC_SYS_SPU(func) PPC_SYS(func)
38#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
35 39
36#ifdef CONFIG_PPC64 40#ifdef CONFIG_PPC64
37#define sys_sigpending sys_ni_syscall 41#define sys_sigpending sys_ni_syscall
@@ -39,309 +43,4 @@
39#endif 43#endif
40 44
41_GLOBAL(sys_call_table) 45_GLOBAL(sys_call_table)
42SYSCALL(restart_syscall) 46#include <asm/systbl.h>
43SYSCALL(exit)
44PPC_SYS(fork)
45SYSCALL(read)
46SYSCALL(write)
47COMPAT_SYS(open)
48SYSCALL(close)
49COMPAT_SYS(waitpid)
50COMPAT_SYS(creat)
51SYSCALL(link)
52SYSCALL(unlink)
53COMPAT_SYS(execve)
54SYSCALL(chdir)
55COMPAT_SYS(time)
56SYSCALL(mknod)
57SYSCALL(chmod)
58SYSCALL(lchown)
59SYSCALL(ni_syscall)
60OLDSYS(stat)
61SYSX(sys_lseek,ppc32_lseek,sys_lseek)
62SYSCALL(getpid)
63COMPAT_SYS(mount)
64SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
65SYSCALL(setuid)
66SYSCALL(getuid)
67COMPAT_SYS(stime)
68COMPAT_SYS(ptrace)
69SYSCALL(alarm)
70OLDSYS(fstat)
71COMPAT_SYS(pause)
72COMPAT_SYS(utime)
73SYSCALL(ni_syscall)
74SYSCALL(ni_syscall)
75COMPAT_SYS(access)
76COMPAT_SYS(nice)
77SYSCALL(ni_syscall)
78SYSCALL(sync)
79COMPAT_SYS(kill)
80SYSCALL(rename)
81COMPAT_SYS(mkdir)
82SYSCALL(rmdir)
83SYSCALL(dup)
84SYSCALL(pipe)
85COMPAT_SYS(times)
86SYSCALL(ni_syscall)
87SYSCALL(brk)
88SYSCALL(setgid)
89SYSCALL(getgid)
90SYSCALL(signal)
91SYSCALL(geteuid)
92SYSCALL(getegid)
93SYSCALL(acct)
94SYSCALL(umount)
95SYSCALL(ni_syscall)
96COMPAT_SYS(ioctl)
97COMPAT_SYS(fcntl)
98SYSCALL(ni_syscall)
99COMPAT_SYS(setpgid)
100SYSCALL(ni_syscall)
101SYSX(sys_ni_syscall,sys_olduname, sys_olduname)
102COMPAT_SYS(umask)
103SYSCALL(chroot)
104SYSCALL(ustat)
105SYSCALL(dup2)
106SYSCALL(getppid)
107SYSCALL(getpgrp)
108SYSCALL(setsid)
109SYS32ONLY(sigaction)
110SYSCALL(sgetmask)
111COMPAT_SYS(ssetmask)
112SYSCALL(setreuid)
113SYSCALL(setregid)
114SYS32ONLY(sigsuspend)
115COMPAT_SYS(sigpending)
116COMPAT_SYS(sethostname)
117COMPAT_SYS(setrlimit)
118COMPAT_SYS(old_getrlimit)
119COMPAT_SYS(getrusage)
120COMPAT_SYS(gettimeofday)
121COMPAT_SYS(settimeofday)
122COMPAT_SYS(getgroups)
123COMPAT_SYS(setgroups)
124SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
125SYSCALL(symlink)
126OLDSYS(lstat)
127COMPAT_SYS(readlink)
128SYSCALL(uselib)
129SYSCALL(swapon)
130SYSCALL(reboot)
131SYSX(sys_ni_syscall,old32_readdir,old_readdir)
132SYSCALL(mmap)
133SYSCALL(munmap)
134SYSCALL(truncate)
135SYSCALL(ftruncate)
136SYSCALL(fchmod)
137SYSCALL(fchown)
138COMPAT_SYS(getpriority)
139COMPAT_SYS(setpriority)
140SYSCALL(ni_syscall)
141COMPAT_SYS(statfs)
142COMPAT_SYS(fstatfs)
143SYSCALL(ni_syscall)
144COMPAT_SYS(socketcall)
145COMPAT_SYS(syslog)
146COMPAT_SYS(setitimer)
147COMPAT_SYS(getitimer)
148COMPAT_SYS(newstat)
149COMPAT_SYS(newlstat)
150COMPAT_SYS(newfstat)
151SYSX(sys_ni_syscall,sys_uname,sys_uname)
152SYSCALL(ni_syscall)
153SYSCALL(vhangup)
154SYSCALL(ni_syscall)
155SYSCALL(ni_syscall)
156COMPAT_SYS(wait4)
157SYSCALL(swapoff)
158COMPAT_SYS(sysinfo)
159COMPAT_SYS(ipc)
160SYSCALL(fsync)
161SYS32ONLY(sigreturn)
162PPC_SYS(clone)
163COMPAT_SYS(setdomainname)
164PPC_SYS(newuname)
165SYSCALL(ni_syscall)
166COMPAT_SYS(adjtimex)
167SYSCALL(mprotect)
168SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
169SYSCALL(ni_syscall)
170SYSCALL(init_module)
171SYSCALL(delete_module)
172SYSCALL(ni_syscall)
173SYSCALL(quotactl)
174COMPAT_SYS(getpgid)
175SYSCALL(fchdir)
176SYSCALL(bdflush)
177COMPAT_SYS(sysfs)
178SYSX(ppc64_personality,ppc64_personality,sys_personality)
179SYSCALL(ni_syscall)
180SYSCALL(setfsuid)
181SYSCALL(setfsgid)
182SYSCALL(llseek)
183COMPAT_SYS(getdents)
184SYSX(sys_select,ppc32_select,ppc_select)
185SYSCALL(flock)
186SYSCALL(msync)
187COMPAT_SYS(readv)
188COMPAT_SYS(writev)
189COMPAT_SYS(getsid)
190SYSCALL(fdatasync)
191COMPAT_SYS(sysctl)
192SYSCALL(mlock)
193SYSCALL(munlock)
194SYSCALL(mlockall)
195SYSCALL(munlockall)
196COMPAT_SYS(sched_setparam)
197COMPAT_SYS(sched_getparam)
198COMPAT_SYS(sched_setscheduler)
199COMPAT_SYS(sched_getscheduler)
200SYSCALL(sched_yield)
201COMPAT_SYS(sched_get_priority_max)
202COMPAT_SYS(sched_get_priority_min)
203COMPAT_SYS(sched_rr_get_interval)
204COMPAT_SYS(nanosleep)
205SYSCALL(mremap)
206SYSCALL(setresuid)
207SYSCALL(getresuid)
208SYSCALL(ni_syscall)
209SYSCALL(poll)
210COMPAT_SYS(nfsservctl)
211SYSCALL(setresgid)
212SYSCALL(getresgid)
213COMPAT_SYS(prctl)
214COMPAT_SYS(rt_sigreturn)
215COMPAT_SYS(rt_sigaction)
216COMPAT_SYS(rt_sigprocmask)
217COMPAT_SYS(rt_sigpending)
218COMPAT_SYS(rt_sigtimedwait)
219COMPAT_SYS(rt_sigqueueinfo)
220COMPAT_SYS(rt_sigsuspend)
221COMPAT_SYS(pread64)
222COMPAT_SYS(pwrite64)
223SYSCALL(chown)
224SYSCALL(getcwd)
225SYSCALL(capget)
226SYSCALL(capset)
227COMPAT_SYS(sigaltstack)
228SYSX(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
229SYSCALL(ni_syscall)
230SYSCALL(ni_syscall)
231PPC_SYS(vfork)
232COMPAT_SYS(getrlimit)
233COMPAT_SYS(readahead)
234SYS32ONLY(mmap2)
235SYS32ONLY(truncate64)
236SYS32ONLY(ftruncate64)
237SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
238SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
239SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
240SYSCALL(pciconfig_read)
241SYSCALL(pciconfig_write)
242SYSCALL(pciconfig_iobase)
243SYSCALL(ni_syscall)
244SYSCALL(getdents64)
245SYSCALL(pivot_root)
246SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
247SYSCALL(madvise)
248SYSCALL(mincore)
249SYSCALL(gettid)
250SYSCALL(tkill)
251SYSCALL(setxattr)
252SYSCALL(lsetxattr)
253SYSCALL(fsetxattr)
254SYSCALL(getxattr)
255SYSCALL(lgetxattr)
256SYSCALL(fgetxattr)
257SYSCALL(listxattr)
258SYSCALL(llistxattr)
259SYSCALL(flistxattr)
260SYSCALL(removexattr)
261SYSCALL(lremovexattr)
262SYSCALL(fremovexattr)
263COMPAT_SYS(futex)
264COMPAT_SYS(sched_setaffinity)
265COMPAT_SYS(sched_getaffinity)
266SYSCALL(ni_syscall)
267SYSCALL(ni_syscall)
268SYS32ONLY(sendfile64)
269COMPAT_SYS(io_setup)
270SYSCALL(io_destroy)
271COMPAT_SYS(io_getevents)
272COMPAT_SYS(io_submit)
273SYSCALL(io_cancel)
274SYSCALL(set_tid_address)
275SYSX(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
276SYSCALL(exit_group)
277SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie)
278SYSCALL(epoll_create)
279SYSCALL(epoll_ctl)
280SYSCALL(epoll_wait)
281SYSCALL(remap_file_pages)
282SYSX(sys_timer_create,compat_sys_timer_create,sys_timer_create)
283COMPAT_SYS(timer_settime)
284COMPAT_SYS(timer_gettime)
285SYSCALL(timer_getoverrun)
286SYSCALL(timer_delete)
287COMPAT_SYS(clock_settime)
288COMPAT_SYS(clock_gettime)
289COMPAT_SYS(clock_getres)
290COMPAT_SYS(clock_nanosleep)
291SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
292COMPAT_SYS(tgkill)
293COMPAT_SYS(utimes)
294COMPAT_SYS(statfs64)
295COMPAT_SYS(fstatfs64)
296SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
297PPC_SYS(rtas)
298OLDSYS(debug_setcontext)
299SYSCALL(ni_syscall)
300SYSCALL(ni_syscall)
301COMPAT_SYS(mbind)
302COMPAT_SYS(get_mempolicy)
303COMPAT_SYS(set_mempolicy)
304COMPAT_SYS(mq_open)
305SYSCALL(mq_unlink)
306COMPAT_SYS(mq_timedsend)
307COMPAT_SYS(mq_timedreceive)
308COMPAT_SYS(mq_notify)
309COMPAT_SYS(mq_getsetattr)
310COMPAT_SYS(kexec_load)
311COMPAT_SYS(add_key)
312COMPAT_SYS(request_key)
313COMPAT_SYS(keyctl)
314COMPAT_SYS(waitid)
315COMPAT_SYS(ioprio_set)
316COMPAT_SYS(ioprio_get)
317SYSCALL(inotify_init)
318SYSCALL(inotify_add_watch)
319SYSCALL(inotify_rm_watch)
320SYSCALL(spu_run)
321SYSCALL(spu_create)
322COMPAT_SYS(pselect6)
323COMPAT_SYS(ppoll)
324SYSCALL(unshare)
325SYSCALL(splice)
326SYSCALL(tee)
327SYSCALL(vmsplice)
328COMPAT_SYS(openat)
329SYSCALL(mkdirat)
330SYSCALL(mknodat)
331SYSCALL(fchownat)
332COMPAT_SYS(futimesat)
333SYSX(sys_newfstatat, sys_fstatat64, sys_fstatat64)
334SYSCALL(unlinkat)
335SYSCALL(renameat)
336SYSCALL(linkat)
337SYSCALL(symlinkat)
338SYSCALL(readlinkat)
339SYSCALL(fchmodat)
340SYSCALL(faccessat)
341COMPAT_SYS(get_robust_list)
342COMPAT_SYS(set_robust_list)
343
344/*
345 * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c
346 * as well when appropriate.
347 */
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c
index b47fcc5ddb7..47ec3be3edc 100644
--- a/arch/powerpc/platforms/cell/spu_callbacks.c
+++ b/arch/powerpc/platforms/cell/spu_callbacks.c
@@ -34,307 +34,19 @@
34 */ 34 */
35 35
36void *spu_syscall_table[] = { 36void *spu_syscall_table[] = {
37 [__NR_restart_syscall] sys_ni_syscall, /* sys_restart_syscall */ 37#define SYSCALL(func) sys_ni_syscall,
38 [__NR_exit] sys_ni_syscall, /* sys_exit */ 38#define COMPAT_SYS(func) sys_ni_syscall,
39 [__NR_fork] sys_ni_syscall, /* ppc_fork */ 39#define PPC_SYS(func) sys_ni_syscall,
40 [__NR_read] sys_read, 40#define OLDSYS(func) sys_ni_syscall,
41 [__NR_write] sys_write, 41#define SYS32ONLY(func) sys_ni_syscall,
42 [__NR_open] sys_open, 42#define SYSX(f, f3264, f32) sys_ni_syscall,
43 [__NR_close] sys_close, 43
44 [__NR_waitpid] sys_waitpid, 44#define SYSCALL_SPU(func) sys_##func,
45 [__NR_creat] sys_creat, 45#define COMPAT_SYS_SPU(func) sys_##func,
46 [__NR_link] sys_link, 46#define PPC_SYS_SPU(func) ppc_##func,
47 [__NR_unlink] sys_unlink, 47#define SYSX_SPU(f, f3264, f32) f,
48 [__NR_execve] sys_ni_syscall, /* sys_execve */ 48
49 [__NR_chdir] sys_chdir, 49#include <asm/systbl.h>
50 [__NR_time] sys_time,
51 [__NR_mknod] sys_mknod,
52 [__NR_chmod] sys_chmod,
53 [__NR_lchown] sys_lchown,
54 [__NR_break] sys_ni_syscall,
55 [__NR_oldstat] sys_ni_syscall,
56 [__NR_lseek] sys_lseek,
57 [__NR_getpid] sys_getpid,
58 [__NR_mount] sys_ni_syscall, /* sys_mount */
59 [__NR_umount] sys_ni_syscall,
60 [__NR_setuid] sys_setuid,
61 [__NR_getuid] sys_getuid,
62 [__NR_stime] sys_stime,
63 [__NR_ptrace] sys_ni_syscall, /* sys_ptrace */
64 [__NR_alarm] sys_alarm,
65 [__NR_oldfstat] sys_ni_syscall,
66 [__NR_pause] sys_ni_syscall, /* sys_pause */
67 [__NR_utime] sys_ni_syscall, /* sys_utime */
68 [__NR_stty] sys_ni_syscall,
69 [__NR_gtty] sys_ni_syscall,
70 [__NR_access] sys_access,
71 [__NR_nice] sys_nice,
72 [__NR_ftime] sys_ni_syscall,
73 [__NR_sync] sys_sync,
74 [__NR_kill] sys_kill,
75 [__NR_rename] sys_rename,
76 [__NR_mkdir] sys_mkdir,
77 [__NR_rmdir] sys_rmdir,
78 [__NR_dup] sys_dup,
79 [__NR_pipe] sys_pipe,
80 [__NR_times] sys_times,
81 [__NR_prof] sys_ni_syscall,
82 [__NR_brk] sys_brk,
83 [__NR_setgid] sys_setgid,
84 [__NR_getgid] sys_getgid,
85 [__NR_signal] sys_ni_syscall, /* sys_signal */
86 [__NR_geteuid] sys_geteuid,
87 [__NR_getegid] sys_getegid,
88 [__NR_acct] sys_ni_syscall, /* sys_acct */
89 [__NR_umount2] sys_ni_syscall, /* sys_umount */
90 [__NR_lock] sys_ni_syscall,
91 [__NR_ioctl] sys_ioctl,
92 [__NR_fcntl] sys_fcntl,
93 [__NR_mpx] sys_ni_syscall,
94 [__NR_setpgid] sys_setpgid,
95 [__NR_ulimit] sys_ni_syscall,
96 [__NR_oldolduname] sys_ni_syscall,
97 [__NR_umask] sys_umask,
98 [__NR_chroot] sys_chroot,
99 [__NR_ustat] sys_ni_syscall, /* sys_ustat */
100 [__NR_dup2] sys_dup2,
101 [__NR_getppid] sys_getppid,
102 [__NR_getpgrp] sys_getpgrp,
103 [__NR_setsid] sys_setsid,
104 [__NR_sigaction] sys_ni_syscall,
105 [__NR_sgetmask] sys_sgetmask,
106 [__NR_ssetmask] sys_ssetmask,
107 [__NR_setreuid] sys_setreuid,
108 [__NR_setregid] sys_setregid,
109 [__NR_sigsuspend] sys_ni_syscall,
110 [__NR_sigpending] sys_ni_syscall,
111 [__NR_sethostname] sys_sethostname,
112 [__NR_setrlimit] sys_setrlimit,
113 [__NR_getrlimit] sys_ni_syscall,
114 [__NR_getrusage] sys_getrusage,
115 [__NR_gettimeofday] sys_gettimeofday,
116 [__NR_settimeofday] sys_settimeofday,
117 [__NR_getgroups] sys_getgroups,
118 [__NR_setgroups] sys_setgroups,
119 [__NR_select] sys_ni_syscall,
120 [__NR_symlink] sys_symlink,
121 [__NR_oldlstat] sys_ni_syscall,
122 [__NR_readlink] sys_readlink,
123 [__NR_uselib] sys_ni_syscall, /* sys_uselib */
124 [__NR_swapon] sys_ni_syscall, /* sys_swapon */
125 [__NR_reboot] sys_ni_syscall, /* sys_reboot */
126 [__NR_readdir] sys_ni_syscall,
127 [__NR_mmap] sys_mmap,
128 [__NR_munmap] sys_munmap,
129 [__NR_truncate] sys_truncate,
130 [__NR_ftruncate] sys_ftruncate,
131 [__NR_fchmod] sys_fchmod,
132 [__NR_fchown] sys_fchown,
133 [__NR_getpriority] sys_getpriority,
134 [__NR_setpriority] sys_setpriority,
135 [__NR_profil] sys_ni_syscall,
136 [__NR_statfs] sys_ni_syscall, /* sys_statfs */
137 [__NR_fstatfs] sys_ni_syscall, /* sys_fstatfs */
138 [__NR_ioperm] sys_ni_syscall,
139 [__NR_socketcall] sys_socketcall,
140 [__NR_syslog] sys_syslog,
141 [__NR_setitimer] sys_setitimer,
142 [__NR_getitimer] sys_getitimer,
143 [__NR_stat] sys_newstat,
144 [__NR_lstat] sys_newlstat,
145 [__NR_fstat] sys_newfstat,
146 [__NR_olduname] sys_ni_syscall,
147 [__NR_iopl] sys_ni_syscall,
148 [__NR_vhangup] sys_vhangup,
149 [__NR_idle] sys_ni_syscall,
150 [__NR_vm86] sys_ni_syscall,
151 [__NR_wait4] sys_wait4,
152 [__NR_swapoff] sys_ni_syscall, /* sys_swapoff */
153 [__NR_sysinfo] sys_sysinfo,
154 [__NR_ipc] sys_ni_syscall, /* sys_ipc */
155 [__NR_fsync] sys_fsync,
156 [__NR_sigreturn] sys_ni_syscall,
157 [__NR_clone] sys_ni_syscall, /* ppc_clone */
158 [__NR_setdomainname] sys_setdomainname,
159 [__NR_uname] ppc_newuname,
160 [__NR_modify_ldt] sys_ni_syscall,
161 [__NR_adjtimex] sys_adjtimex,
162 [__NR_mprotect] sys_mprotect,
163 [__NR_sigprocmask] sys_ni_syscall,
164 [__NR_create_module] sys_ni_syscall,
165 [__NR_init_module] sys_ni_syscall, /* sys_init_module */
166 [__NR_delete_module] sys_ni_syscall, /* sys_delete_module */
167 [__NR_get_kernel_syms] sys_ni_syscall,
168 [__NR_quotactl] sys_ni_syscall, /* sys_quotactl */
169 [__NR_getpgid] sys_getpgid,
170 [__NR_fchdir] sys_fchdir,
171 [__NR_bdflush] sys_bdflush,
172 [__NR_sysfs] sys_ni_syscall, /* sys_sysfs */
173 [__NR_personality] ppc64_personality,
174 [__NR_afs_syscall] sys_ni_syscall,
175 [__NR_setfsuid] sys_setfsuid,
176 [__NR_setfsgid] sys_setfsgid,
177 [__NR__llseek] sys_llseek,
178 [__NR_getdents] sys_getdents,
179 [__NR__newselect] sys_select,
180 [__NR_flock] sys_flock,
181 [__NR_msync] sys_msync,
182 [__NR_readv] sys_readv,
183 [__NR_writev] sys_writev,
184 [__NR_getsid] sys_getsid,
185 [__NR_fdatasync] sys_fdatasync,
186 [__NR__sysctl] sys_ni_syscall, /* sys_sysctl */
187 [__NR_mlock] sys_mlock,
188 [__NR_munlock] sys_munlock,
189 [__NR_mlockall] sys_mlockall,
190 [__NR_munlockall] sys_munlockall,
191 [__NR_sched_setparam] sys_sched_setparam,
192 [__NR_sched_getparam] sys_sched_getparam,
193 [__NR_sched_setscheduler] sys_sched_setscheduler,
194 [__NR_sched_getscheduler] sys_sched_getscheduler,
195 [__NR_sched_yield] sys_sched_yield,
196 [__NR_sched_get_priority_max] sys_sched_get_priority_max,
197 [__NR_sched_get_priority_min] sys_sched_get_priority_min,
198 [__NR_sched_rr_get_interval] sys_sched_rr_get_interval,
199 [__NR_nanosleep] sys_nanosleep,
200 [__NR_mremap] sys_mremap,
201 [__NR_setresuid] sys_setresuid,
202 [__NR_getresuid] sys_getresuid,
203 [__NR_query_module] sys_ni_syscall,
204 [__NR_poll] sys_poll,
205 [__NR_nfsservctl] sys_ni_syscall, /* sys_nfsservctl */
206 [__NR_setresgid] sys_setresgid,
207 [__NR_getresgid] sys_getresgid,
208 [__NR_prctl] sys_prctl,
209 [__NR_rt_sigreturn] sys_ni_syscall, /* ppc64_rt_sigreturn */
210 [__NR_rt_sigaction] sys_ni_syscall, /* sys_rt_sigaction */
211 [__NR_rt_sigprocmask] sys_ni_syscall, /* sys_rt_sigprocmask */
212 [__NR_rt_sigpending] sys_ni_syscall, /* sys_rt_sigpending */
213 [__NR_rt_sigtimedwait] sys_ni_syscall, /* sys_rt_sigtimedwait */
214 [__NR_rt_sigqueueinfo] sys_ni_syscall, /* sys_rt_sigqueueinfo */
215 [__NR_rt_sigsuspend] sys_ni_syscall, /* sys_rt_sigsuspend */
216 [__NR_pread64] sys_pread64,
217 [__NR_pwrite64] sys_pwrite64,
218 [__NR_chown] sys_chown,
219 [__NR_getcwd] sys_getcwd,
220 [__NR_capget] sys_capget,
221 [__NR_capset] sys_capset,
222 [__NR_sigaltstack] sys_ni_syscall, /* sys_sigaltstack */
223 [__NR_sendfile] sys_sendfile64,
224 [__NR_getpmsg] sys_ni_syscall,
225 [__NR_putpmsg] sys_ni_syscall,
226 [__NR_vfork] sys_ni_syscall, /* ppc_vfork */
227 [__NR_ugetrlimit] sys_getrlimit,
228 [__NR_readahead] sys_readahead,
229 [192] sys_ni_syscall,
230 [193] sys_ni_syscall,
231 [194] sys_ni_syscall,
232 [195] sys_ni_syscall,
233 [196] sys_ni_syscall,
234 [197] sys_ni_syscall,
235 [__NR_pciconfig_read] sys_ni_syscall, /* sys_pciconfig_read */
236 [__NR_pciconfig_write] sys_ni_syscall, /* sys_pciconfig_write */
237 [__NR_pciconfig_iobase] sys_ni_syscall, /* sys_pciconfig_iobase */
238 [__NR_multiplexer] sys_ni_syscall,
239 [__NR_getdents64] sys_getdents64,
240 [__NR_pivot_root] sys_pivot_root,
241 [204] sys_ni_syscall,
242 [__NR_madvise] sys_madvise,
243 [__NR_mincore] sys_mincore,
244 [__NR_gettid] sys_gettid,
245 [__NR_tkill] sys_tkill,
246 [__NR_setxattr] sys_setxattr,
247 [__NR_lsetxattr] sys_lsetxattr,
248 [__NR_fsetxattr] sys_fsetxattr,
249 [__NR_getxattr] sys_getxattr,
250 [__NR_lgetxattr] sys_lgetxattr,
251 [__NR_fgetxattr] sys_fgetxattr,
252 [__NR_listxattr] sys_listxattr,
253 [__NR_llistxattr] sys_llistxattr,
254 [__NR_flistxattr] sys_flistxattr,
255 [__NR_removexattr] sys_removexattr,
256 [__NR_lremovexattr] sys_lremovexattr,
257 [__NR_fremovexattr] sys_fremovexattr,
258 [__NR_futex] sys_futex,
259 [__NR_sched_setaffinity] sys_sched_setaffinity,
260 [__NR_sched_getaffinity] sys_sched_getaffinity,
261 [224] sys_ni_syscall,
262 [__NR_tuxcall] sys_ni_syscall,
263 [226] sys_ni_syscall,
264 [__NR_io_setup] sys_io_setup,
265 [__NR_io_destroy] sys_io_destroy,
266 [__NR_io_getevents] sys_io_getevents,
267 [__NR_io_submit] sys_io_submit,
268 [__NR_io_cancel] sys_io_cancel,
269 [__NR_set_tid_address] sys_ni_syscall, /* sys_set_tid_address */
270 [__NR_fadvise64] sys_fadvise64,
271 [__NR_exit_group] sys_ni_syscall, /* sys_exit_group */
272 [__NR_lookup_dcookie] sys_ni_syscall, /* sys_lookup_dcookie */
273 [__NR_epoll_create] sys_epoll_create,
274 [__NR_epoll_ctl] sys_epoll_ctl,
275 [__NR_epoll_wait] sys_epoll_wait,
276 [__NR_remap_file_pages] sys_remap_file_pages,
277 [__NR_timer_create] sys_timer_create,
278 [__NR_timer_settime] sys_timer_settime,
279 [__NR_timer_gettime] sys_timer_gettime,
280 [__NR_timer_getoverrun] sys_timer_getoverrun,
281 [__NR_timer_delete] sys_timer_delete,
282 [__NR_clock_settime] sys_clock_settime,
283 [__NR_clock_gettime] sys_clock_gettime,
284 [__NR_clock_getres] sys_clock_getres,
285 [__NR_clock_nanosleep] sys_clock_nanosleep,
286 [__NR_swapcontext] sys_ni_syscall, /* ppc64_swapcontext */
287 [__NR_tgkill] sys_tgkill,
288 [__NR_utimes] sys_utimes,
289 [__NR_statfs64] sys_statfs64,
290 [__NR_fstatfs64] sys_fstatfs64,
291 [254] sys_ni_syscall,
292 [__NR_rtas] ppc_rtas,
293 [256] sys_ni_syscall,
294 [257] sys_ni_syscall,
295 [258] sys_ni_syscall,
296 [__NR_mbind] sys_ni_syscall, /* sys_mbind */
297 [__NR_get_mempolicy] sys_ni_syscall, /* sys_get_mempolicy */
298 [__NR_set_mempolicy] sys_ni_syscall, /* sys_set_mempolicy */
299 [__NR_mq_open] sys_ni_syscall, /* sys_mq_open */
300 [__NR_mq_unlink] sys_ni_syscall, /* sys_mq_unlink */
301 [__NR_mq_timedsend] sys_ni_syscall, /* sys_mq_timedsend */
302 [__NR_mq_timedreceive] sys_ni_syscall, /* sys_mq_timedreceive */
303 [__NR_mq_notify] sys_ni_syscall, /* sys_mq_notify */
304 [__NR_mq_getsetattr] sys_ni_syscall, /* sys_mq_getsetattr */
305 [__NR_kexec_load] sys_ni_syscall, /* sys_kexec_load */
306 [__NR_add_key] sys_ni_syscall, /* sys_add_key */
307 [__NR_request_key] sys_ni_syscall, /* sys_request_key */
308 [__NR_keyctl] sys_ni_syscall, /* sys_keyctl */
309 [__NR_waitid] sys_ni_syscall, /* sys_waitid */
310 [__NR_ioprio_set] sys_ni_syscall, /* sys_ioprio_set */
311 [__NR_ioprio_get] sys_ni_syscall, /* sys_ioprio_get */
312 [__NR_inotify_init] sys_ni_syscall, /* sys_inotify_init */
313 [__NR_inotify_add_watch] sys_ni_syscall, /* sys_inotify_add_watch */
314 [__NR_inotify_rm_watch] sys_ni_syscall, /* sys_inotify_rm_watch */
315 [__NR_spu_run] sys_ni_syscall, /* sys_spu_run */
316 [__NR_spu_create] sys_ni_syscall, /* sys_spu_create */
317 [__NR_pselect6] sys_ni_syscall, /* sys_pselect */
318 [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */
319 [__NR_unshare] sys_unshare,
320 [__NR_splice] sys_splice,
321 [__NR_tee] sys_tee,
322 [__NR_vmsplice] sys_vmsplice,
323 [__NR_openat] sys_openat,
324 [__NR_mkdirat] sys_mkdirat,
325 [__NR_mknodat] sys_mknodat,
326 [__NR_fchownat] sys_fchownat,
327 [__NR_futimesat] sys_futimesat,
328 [__NR_newfstatat] sys_newfstatat,
329 [__NR_unlinkat] sys_unlinkat,
330 [__NR_renameat] sys_renameat,
331 [__NR_linkat] sys_linkat,
332 [__NR_symlinkat] sys_symlinkat,
333 [__NR_readlinkat] sys_readlinkat,
334 [__NR_fchmodat] sys_fchmodat,
335 [__NR_faccessat] sys_faccessat,
336 [__NR_get_robust_list] sys_get_robust_list,
337 [__NR_set_robust_list] sys_set_robust_list,
338}; 50};
339 51
340long spu_sys_callback(struct spu_syscall_block *s) 52long spu_sys_callback(struct spu_syscall_block *s)
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
new file mode 100644
index 00000000000..eac85ce101b
--- /dev/null
+++ b/include/asm-powerpc/systbl.h
@@ -0,0 +1,306 @@
1/*
2 * List of powerpc syscalls. For the meaning of the _SPU suffix see
3 * arch/powerpc/platforms/cell/spu_callbacks.c
4 */
5
6SYSCALL(restart_syscall)
7SYSCALL(exit)
8PPC_SYS(fork)
9SYSCALL_SPU(read)
10SYSCALL_SPU(write)
11COMPAT_SYS_SPU(open)
12SYSCALL_SPU(close)
13COMPAT_SYS_SPU(waitpid)
14COMPAT_SYS_SPU(creat)
15SYSCALL_SPU(link)
16SYSCALL_SPU(unlink)
17COMPAT_SYS(execve)
18SYSCALL_SPU(chdir)
19COMPAT_SYS_SPU(time)
20SYSCALL_SPU(mknod)
21SYSCALL_SPU(chmod)
22SYSCALL_SPU(lchown)
23SYSCALL(ni_syscall)
24OLDSYS(stat)
25SYSX_SPU(sys_lseek,ppc32_lseek,sys_lseek)
26SYSCALL_SPU(getpid)
27COMPAT_SYS(mount)
28SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
29SYSCALL_SPU(setuid)
30SYSCALL_SPU(getuid)
31COMPAT_SYS_SPU(stime)
32COMPAT_SYS(ptrace)
33SYSCALL_SPU(alarm)
34OLDSYS(fstat)
35COMPAT_SYS(pause)
36COMPAT_SYS(utime)
37SYSCALL(ni_syscall)
38SYSCALL(ni_syscall)
39COMPAT_SYS_SPU(access)
40COMPAT_SYS_SPU(nice)
41SYSCALL(ni_syscall)
42SYSCALL_SPU(sync)
43COMPAT_SYS_SPU(kill)
44SYSCALL_SPU(rename)
45COMPAT_SYS_SPU(mkdir)
46SYSCALL_SPU(rmdir)
47SYSCALL_SPU(dup)
48SYSCALL_SPU(pipe)
49COMPAT_SYS_SPU(times)
50SYSCALL(ni_syscall)
51SYSCALL_SPU(brk)
52SYSCALL_SPU(setgid)
53SYSCALL_SPU(getgid)
54SYSCALL(signal)
55SYSCALL_SPU(geteuid)
56SYSCALL_SPU(getegid)
57SYSCALL(acct)
58SYSCALL(umount)
59SYSCALL(ni_syscall)
60COMPAT_SYS_SPU(ioctl)
61COMPAT_SYS_SPU(fcntl)
62SYSCALL(ni_syscall)
63COMPAT_SYS_SPU(setpgid)
64SYSCALL(ni_syscall)
65SYSX(sys_ni_syscall,sys_olduname, sys_olduname)
66COMPAT_SYS_SPU(umask)
67SYSCALL_SPU(chroot)
68SYSCALL(ustat)
69SYSCALL_SPU(dup2)
70SYSCALL_SPU(getppid)
71SYSCALL_SPU(getpgrp)
72SYSCALL_SPU(setsid)
73SYS32ONLY(sigaction)
74SYSCALL_SPU(sgetmask)
75COMPAT_SYS_SPU(ssetmask)
76SYSCALL_SPU(setreuid)
77SYSCALL_SPU(setregid)
78SYS32ONLY(sigsuspend)
79COMPAT_SYS(sigpending)
80COMPAT_SYS_SPU(sethostname)
81COMPAT_SYS_SPU(setrlimit)
82COMPAT_SYS(old_getrlimit)
83COMPAT_SYS_SPU(getrusage)
84COMPAT_SYS_SPU(gettimeofday)
85COMPAT_SYS_SPU(settimeofday)
86COMPAT_SYS_SPU(getgroups)
87COMPAT_SYS_SPU(setgroups)
88SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
89SYSCALL_SPU(symlink)
90OLDSYS(lstat)
91COMPAT_SYS_SPU(readlink)
92SYSCALL(uselib)
93SYSCALL(swapon)
94SYSCALL(reboot)
95SYSX(sys_ni_syscall,old32_readdir,old_readdir)
96SYSCALL_SPU(mmap)
97SYSCALL_SPU(munmap)
98SYSCALL_SPU(truncate)
99SYSCALL_SPU(ftruncate)
100SYSCALL_SPU(fchmod)
101SYSCALL_SPU(fchown)
102COMPAT_SYS_SPU(getpriority)
103COMPAT_SYS_SPU(setpriority)
104SYSCALL(ni_syscall)
105COMPAT_SYS(statfs)
106COMPAT_SYS(fstatfs)
107SYSCALL(ni_syscall)
108COMPAT_SYS_SPU(socketcall)
109COMPAT_SYS_SPU(syslog)
110COMPAT_SYS_SPU(setitimer)
111COMPAT_SYS_SPU(getitimer)
112COMPAT_SYS_SPU(newstat)
113COMPAT_SYS_SPU(newlstat)
114COMPAT_SYS_SPU(newfstat)
115SYSX(sys_ni_syscall,sys_uname,sys_uname)
116SYSCALL(ni_syscall)
117SYSCALL_SPU(vhangup)
118SYSCALL(ni_syscall)
119SYSCALL(ni_syscall)
120COMPAT_SYS_SPU(wait4)
121SYSCALL(swapoff)
122COMPAT_SYS_SPU(sysinfo)
123COMPAT_SYS(ipc)
124SYSCALL_SPU(fsync)
125SYS32ONLY(sigreturn)
126PPC_SYS(clone)
127COMPAT_SYS_SPU(setdomainname)
128PPC_SYS_SPU(newuname)
129SYSCALL(ni_syscall)
130COMPAT_SYS_SPU(adjtimex)
131SYSCALL_SPU(mprotect)
132SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
133SYSCALL(ni_syscall)
134SYSCALL(init_module)
135SYSCALL(delete_module)
136SYSCALL(ni_syscall)
137SYSCALL(quotactl)
138COMPAT_SYS_SPU(getpgid)
139SYSCALL_SPU(fchdir)
140SYSCALL_SPU(bdflush)
141COMPAT_SYS(sysfs)
142SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)
143SYSCALL(ni_syscall)
144SYSCALL_SPU(setfsuid)
145SYSCALL_SPU(setfsgid)
146SYSCALL_SPU(llseek)
147COMPAT_SYS_SPU(getdents)
148SYSX_SPU(sys_select,ppc32_select,ppc_select)
149SYSCALL_SPU(flock)
150SYSCALL_SPU(msync)
151COMPAT_SYS_SPU(readv)
152COMPAT_SYS_SPU(writev)
153COMPAT_SYS_SPU(getsid)
154SYSCALL_SPU(fdatasync)
155COMPAT_SYS(sysctl)
156SYSCALL_SPU(mlock)
157SYSCALL_SPU(munlock)
158SYSCALL_SPU(mlockall)
159SYSCALL_SPU(munlockall)
160COMPAT_SYS_SPU(sched_setparam)
161COMPAT_SYS_SPU(sched_getparam)
162COMPAT_SYS_SPU(sched_setscheduler)
163COMPAT_SYS_SPU(sched_getscheduler)
164SYSCALL_SPU(sched_yield)
165COMPAT_SYS_SPU(sched_get_priority_max)
166COMPAT_SYS_SPU(sched_get_priority_min)
167COMPAT_SYS_SPU(sched_rr_get_interval)
168COMPAT_SYS_SPU(nanosleep)
169SYSCALL_SPU(mremap)
170SYSCALL_SPU(setresuid)
171SYSCALL_SPU(getresuid)
172SYSCALL(ni_syscall)
173SYSCALL_SPU(poll)
174COMPAT_SYS(nfsservctl)
175SYSCALL_SPU(setresgid)
176SYSCALL_SPU(getresgid)
177COMPAT_SYS_SPU(prctl)
178COMPAT_SYS(rt_sigreturn)
179COMPAT_SYS(rt_sigaction)
180COMPAT_SYS(rt_sigprocmask)
181COMPAT_SYS(rt_sigpending)
182COMPAT_SYS(rt_sigtimedwait)
183COMPAT_SYS(rt_sigqueueinfo)
184COMPAT_SYS(rt_sigsuspend)
185COMPAT_SYS_SPU(pread64)
186COMPAT_SYS_SPU(pwrite64)
187SYSCALL_SPU(chown)
188SYSCALL_SPU(getcwd)
189SYSCALL_SPU(capget)
190SYSCALL_SPU(capset)
191COMPAT_SYS(sigaltstack)
192SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
193SYSCALL(ni_syscall)
194SYSCALL(ni_syscall)
195PPC_SYS(vfork)
196COMPAT_SYS_SPU(getrlimit)
197COMPAT_SYS_SPU(readahead)
198SYS32ONLY(mmap2)
199SYS32ONLY(truncate64)
200SYS32ONLY(ftruncate64)
201SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
202SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
203SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
204SYSCALL(pciconfig_read)
205SYSCALL(pciconfig_write)
206SYSCALL(pciconfig_iobase)
207SYSCALL(ni_syscall)
208SYSCALL_SPU(getdents64)
209SYSCALL_SPU(pivot_root)
210SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
211SYSCALL_SPU(madvise)
212SYSCALL_SPU(mincore)
213SYSCALL_SPU(gettid)
214SYSCALL_SPU(tkill)
215SYSCALL_SPU(setxattr)
216SYSCALL_SPU(lsetxattr)
217SYSCALL_SPU(fsetxattr)
218SYSCALL_SPU(getxattr)
219SYSCALL_SPU(lgetxattr)
220SYSCALL_SPU(fgetxattr)
221SYSCALL_SPU(listxattr)
222SYSCALL_SPU(llistxattr)
223SYSCALL_SPU(flistxattr)
224SYSCALL_SPU(removexattr)
225SYSCALL_SPU(lremovexattr)
226SYSCALL_SPU(fremovexattr)
227COMPAT_SYS_SPU(futex)
228COMPAT_SYS_SPU(sched_setaffinity)
229COMPAT_SYS_SPU(sched_getaffinity)
230SYSCALL(ni_syscall)
231SYSCALL(ni_syscall)
232SYS32ONLY(sendfile64)
233COMPAT_SYS_SPU(io_setup)
234SYSCALL_SPU(io_destroy)
235COMPAT_SYS_SPU(io_getevents)
236COMPAT_SYS_SPU(io_submit)
237SYSCALL_SPU(io_cancel)
238SYSCALL(set_tid_address)
239SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
240SYSCALL(exit_group)
241SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie)
242SYSCALL_SPU(epoll_create)
243SYSCALL_SPU(epoll_ctl)
244SYSCALL_SPU(epoll_wait)
245SYSCALL_SPU(remap_file_pages)
246SYSX_SPU(sys_timer_create,compat_sys_timer_create,sys_timer_create)
247COMPAT_SYS_SPU(timer_settime)
248COMPAT_SYS_SPU(timer_gettime)
249SYSCALL_SPU(timer_getoverrun)
250SYSCALL_SPU(timer_delete)
251COMPAT_SYS_SPU(clock_settime)
252COMPAT_SYS_SPU(clock_gettime)
253COMPAT_SYS_SPU(clock_getres)
254COMPAT_SYS_SPU(clock_nanosleep)
255SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
256COMPAT_SYS_SPU(tgkill)
257COMPAT_SYS_SPU(utimes)
258COMPAT_SYS_SPU(statfs64)
259COMPAT_SYS_SPU(fstatfs64)
260SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
261PPC_SYS_SPU(rtas)
262OLDSYS(debug_setcontext)
263SYSCALL(ni_syscall)
264SYSCALL(ni_syscall)
265COMPAT_SYS(mbind)
266COMPAT_SYS(get_mempolicy)
267COMPAT_SYS(set_mempolicy)
268COMPAT_SYS(mq_open)
269SYSCALL(mq_unlink)
270COMPAT_SYS(mq_timedsend)
271COMPAT_SYS(mq_timedreceive)
272COMPAT_SYS(mq_notify)
273COMPAT_SYS(mq_getsetattr)
274COMPAT_SYS(kexec_load)
275COMPAT_SYS(add_key)
276COMPAT_SYS(request_key)
277COMPAT_SYS(keyctl)
278COMPAT_SYS(waitid)
279COMPAT_SYS(ioprio_set)
280COMPAT_SYS(ioprio_get)
281SYSCALL(inotify_init)
282SYSCALL(inotify_add_watch)
283SYSCALL(inotify_rm_watch)
284SYSCALL(spu_run)
285SYSCALL(spu_create)
286COMPAT_SYS(pselect6)
287COMPAT_SYS(ppoll)
288SYSCALL_SPU(unshare)
289SYSCALL_SPU(splice)
290SYSCALL_SPU(tee)
291SYSCALL_SPU(vmsplice)
292COMPAT_SYS_SPU(openat)
293SYSCALL_SPU(mkdirat)
294SYSCALL_SPU(mknodat)
295SYSCALL_SPU(fchownat)
296COMPAT_SYS_SPU(futimesat)
297SYSX_SPU(sys_newfstatat, sys_fstatat64, sys_fstatat64)
298SYSCALL_SPU(unlinkat)
299SYSCALL_SPU(renameat)
300SYSCALL_SPU(linkat)
301SYSCALL_SPU(symlinkat)
302SYSCALL_SPU(readlinkat)
303SYSCALL_SPU(fchmodat)
304SYSCALL_SPU(faccessat)
305COMPAT_SYS_SPU(get_robust_list)
306COMPAT_SYS_SPU(set_robust_list)