Cleanup. Kill linux_sys_msync and use sys___msync13 instead.
[netbsd-mini2440.git] / sys / compat / linux / arch / powerpc / syscalls.master
blob13551698d3136eb71e77cc957ec6b1d1d269d98d
1         $NetBSD: syscalls.master,v 1.35 2007/12/24 14:17:18 njoly Exp $  
3 ;       @(#)syscalls.master     8.1 (Berkeley) 7/19/93
5 ; Derived from NetBSD's sys/compat/linux/arch/i386/syscalls.master
6 ; sys/compat/linux/arch/m68k/syscalls.master
7 ; and from Linux's arch/ppc/kernel/misc.S
9 ; We have problems for a few syscalls, specially:
10 ; 142 ppc_select -> sys_new_select -> sys_select (Conflicts with 82 ???).
12 ; Expect problems with the following, which have an architecture dependent
13 ; implementation in Linux/powerpc:
14 ; 29  pause
15 ; 42  pipe      tested. no problem.
16 ; 59  olduname
17 ; 101 ioperm
18 ; 109 uname
19 ; 117 ipc
21 ; Most of syscalls after 182 that were introduced in Linux-2.4 are UNIMPL.
23 ; The following are UNIMPL here. The Linux kernel implements them but just logs
24 ; a kernel error and returns -ENOSYS.
25 ; 110 iopl
26 ; 113 vm86
27 ; 123 modify_ldt
28 ; 198 sys_pciconfig_read
29 ; 199 sys_pciconfig_write
30 ; 200 sys_pciconfig_iobase
32 ; Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
34 ; NetBSD powerpc COMPAT_LINUX system call name/number "master" file.
35 ; (See syscalls.conf to see what it is processed into.)
37 ; Fields: number type [type-dependent ...]
38 ;       number  system call number, must be in order
39 ;       type    one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
40 ;               the compatibility options defined in syscalls.conf.
42 ; types:
43 ;       STD     always included
44 ;       OBSOL   obsolete, not included in system
45 ;       UNIMPL  unimplemented, not included in system
46 ;       NODEF   included, but don't define the syscall number
47 ;       NOARGS  included, but don't define the syscall args structure
48 ;       INDIR   included, but don't define the syscall args structure
49 ;               and allow it to be "really" varargs.
51 ; The compat options are defined in the syscalls.conf file, and the
52 ; compat option name is prefixed to the syscall name.  Other than
53 ; that, they're like NODEF (for 'compat' options), or STD (for
54 ; 'libcompat' options).
56 ; The type-dependent arguments are as follows:
57 ; For STD, NODEF, NOARGS, and compat syscalls:
58 ;       { pseudo-proto } [alias]
59 ; For other syscalls:
60 ;       [comment]
62 ; #ifdef's, etc. may be included, and are copied to the output files.
63 ; #include's are copied to the syscall names and switch definition files only.
65 #if defined(_KERNEL_OPT)
66 #include "opt_compat_netbsd.h"
67 #include "opt_compat_43.h"
68 #endif
70 #include <sys/param.h>
71 #include <sys/poll.h>
72 #include <sys/systm.h>
73 #include <sys/signal.h>
74 #include <sys/mount.h>
75 #include <sys/syscallargs.h>
77 #include <compat/linux/common/linux_types.h>
78 #include <compat/linux/common/linux_signal.h>
79 #include <compat/linux/common/linux_siginfo.h>
80 #include <compat/linux/common/linux_machdep.h>
81 #include <compat/linux/common/linux_mmap.h>
83 #include <compat/linux/linux_syscallargs.h>
87 0       NOARGS          { int linux_sys_nosys(void); } syscall
88 1       NOARGS          { int sys_exit(int rval); }
89 2       NOARGS          { int sys_fork(void); }
90 3       NOARGS          { int sys_read(int fd, char *buf, u_int nbyte); }
91 4       NOARGS          { int sys_write(int fd, char *buf, u_int nbyte); }
92 5       STD             { int linux_sys_open(const char *path, int flags, \
93                             int mode); }
94 6       NOARGS          { int sys_close(int fd); }
95 7       STD             { int linux_sys_waitpid(int pid, int *status, \
96                             int options);}
97 8       STD             { int linux_sys_creat(const char *path, int mode); }
98 9       NOARGS          { int sys_link(const char *path, const char *link); }
99 10      STD             { int linux_sys_unlink(const char *path); }
100 11      NOARGS          { int sys_execve(const char *path, char **argp, \
101                             char **envp); }
102 12      NOARGS          { int sys_chdir(const char *path); }
103 13      STD             { int linux_sys_time(linux_time_t *t); }
104 14      STD             { int linux_sys_mknod(const char *path, int mode, \
105                             int dev); }
106 15      NOARGS          { int sys_chmod(const char *path, int mode); }
107 16      NOARGS          { int sys___posix_lchown(const char *path, int uid, \
108                             int gid); }
109 17      OBSOL           break
110 18      OBSOL           ostat
111 19      NOARGS          { long compat_43_sys_lseek(int fd, long offset, \
112                             int whence); }
113 20      NOARGS MPSAFE   { pid_t sys_getpid(void); }
114 21      UNIMPL          mount
115 22      OBSOL           umount
116 23      NOARGS          { int sys_setuid(uid_t uid); }
117 24      NOARGS          { uid_t sys_getuid(void); }
118 25      STD             { int linux_sys_stime(linux_time_t *t); }
119 26      STD             { int linux_sys_ptrace(int request, int pid, \
120                             int addr, int data); }
121 27      STD             { int linux_sys_alarm(unsigned int secs); }
122 28      OBSOL           ofstat
123 29      STD             { int linux_sys_pause(void); }
124 30      STD             { int linux_sys_utime(const char *path, \
125                             struct linux_utimbuf *times); }
126 31      OBSOL           stty
127 32      OBSOL           gtty
128 33      NOARGS          { int sys_access(const char *path, int flags); }
129 34      STD             { int linux_sys_nice(int incr); }
130 35      OBSOL           ftime
131 36      NOARGS          { int sys_sync(void); }
132 37      STD             { int linux_sys_kill(int pid, int signum); }
133 38      NOARGS          { int sys___posix_rename(const char *from, \
134                             const char *to); }
135 39      NOARGS          { int sys_mkdir(const char *path, int mode); }
136 40      NOARGS          { int sys_rmdir(const char *path); }
137 41      NOARGS          { int sys_dup(u_int fd); }
138 42      STD             { int linux_sys_pipe(int *pfds); }
139 43      STD             { int linux_sys_times(struct times *tms); }
140 44      OBSOL           prof
141 45      STD             { int linux_sys_brk(char *nsize); }
142 46      NOARGS          { int sys_setgid(gid_t gid); }
143 47      NOARGS          { gid_t sys_getgid(void); }
144 48      STD             { int linux_sys_signal(int signum, \
145                             linux_handler_t handler); }
146 49      NOARGS          { uid_t sys_geteuid(void); }
147 50      NOARGS          { gid_t sys_getegid(void); }
148 51      NOARGS          { int sys_acct(char *path); }
149 52      UNIMPL          umount
150 53      OBSOL           lock
151 54      STD             { int linux_sys_ioctl(int fd, u_long com, \
152                             void *data); }
153 55      STD             { int linux_sys_fcntl(int fd, int cmd, void *arg); }
154 56      OBSOL           mpx
155 57      NOARGS          { int sys_setpgid(int pid, int pgid); }
156 58      OBSOL           ulimit
157 59      STD             { int linux_sys_olduname(struct linux_old_utsname \
158                            *up); }
159 60      NOARGS          { int sys_umask(int newmask); }
160 61      NOARGS          { int sys_chroot(char *path); }
161 62      UNIMPL          ustat
162 63      NOARGS          { int sys_dup2(u_int from, u_int to); }
163 64      NOARGS          { pid_t sys_getppid(void); }
164 65      NOARGS          { int sys_getpgrp(void); }
165 66      NOARGS          { int sys_setsid(void); }
166 67      STD             { int linux_sys_sigaction(int signum, \
167                             const struct linux_old_sigaction *nsa, \
168                             struct linux_old_sigaction *osa); }
169 68      STD             { int linux_sys_siggetmask(void); }
170 69      STD             { int linux_sys_sigsetmask(linux_old_sigset_t mask); }
171 70      NOARGS          { int sys_setreuid(uid_t ruid, uid_t euid); }
172 71      NOARGS          { int sys_setregid(gid_t rgid, gid_t egid); }
173 72      STD             { int linux_sys_sigsuspend(void *restart, \
174                             int oldmask, int mask); }
175 73      STD             { int linux_sys_sigpending(linux_old_sigset_t *set); }
176 74      NOARGS          { int compat_43_sys_sethostname(char *hostname, \
177                             u_int len);}
178 75      STD             { int linux_sys_setrlimit(u_int which, \
179                             struct orlimit *rlp); }
180 76      STD             { int linux_sys_getrlimit(u_int which, \
181                             struct orlimit *rlp); }
182 77      NOARGS          { int sys_getrusage(int who, struct rusage *rusage); }
183 78      STD             { int linux_sys_gettimeofday(struct timeval *tp, \
184                             struct timezone *tzp); }
185 79      STD             { int linux_sys_settimeofday(struct timeval *tp, \
186                             struct timezone *tzp); }
187 80      NOARGS          { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
188 81      NOARGS          { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
189 82      STD             { int linux_sys_select(int nfds, fd_set* readfds, \
190                                         fd_set* writefds, fd_set* exceptfds, \
191                                         struct timeval *timeout); }
192 83      NOARGS          { int sys_symlink(const char *path, const char *to); }
193 84      NOARGS          { int compat_43_sys_lstat(const char *path, \
194                             struct stat43 *up); } oolstat
195 85      NOARGS          { int sys_readlink(const char *name, char *buf, \
196                             int count); }
197 #ifdef EXEC_AOUT
198 86      STD             { int linux_sys_uselib(const char *path); }
199 #else
200 86      UNIMPL          sys_uselib
201 #endif
202 87      STD             { int linux_sys_swapon(char *name); }
203 88      STD             { int linux_sys_reboot(int magic1, int magic2, \
204                             int cmd, void *arg); }
205 89      STD             { int linux_sys_readdir(int fd, void *dent, \
206                             unsigned int count); }
207 90      NOARGS          { int linux_sys_mmap(unsigned long addr, size_t len, \
208                             int prot, int flags, int fd, linux_off_t offset); }
209 91      NOARGS          { int sys_munmap(void *addr, int len); }
210 92      NOARGS          { int compat_43_sys_truncate(const char *path, \
211                             long length); }
212 93      NOARGS          { int compat_43_sys_ftruncate(int fd, long length); }
213 94      NOARGS          { int sys_fchmod(int fd, int mode); }
214 95      NOARGS          { int sys___posix_fchown(int fd, int uid, int gid); }
215 96      STD             { int linux_sys_getpriority(int which, int who); }
216 97      NOARGS          { int sys_setpriority(int which, int who, int prio); }
217 98      NOARGS          { int sys_profil(void *samples, u_int size, \
218                             u_int offset, u_int scale); }
219 99      STD             { int linux_sys_statfs(const char *path, \
220                             struct linux_statfs *sp); }
221 100     STD             { int linux_sys_fstatfs(int fd, \
222                             struct linux_statfs *sp); }
223 101     STD             { int linux_sys_ioperm(unsigned int lo, \
224                             unsigned int hi, int val); }
225 102     STD             { int linux_sys_socketcall(int what, void *args); }
226 103     UNIMPL          syslog
227 104     NOARGS          { int sys_setitimer(u_int which, \
228                             struct itimerval *itv, struct itimerval *oitv); }
229 105     NOARGS          { int sys_getitimer(u_int which, \
230                             struct itimerval *itv); }
231 106     STD             { int linux_sys_stat(const char *path, \
232                             struct linux_stat *sp); }
233 107     STD             { int linux_sys_lstat(const char *path, \
234                             struct linux_stat *sp); }
235 108     STD             { int linux_sys_fstat(int fd, struct linux_stat *sp); }
236 109     STD             { int linux_sys_uname(struct linux_utsname *up); }
237 110     UNIMPL          iopl
238 111     UNIMPL          vhangup
239 112     UNIMPL          idle
240 113     UNIMPL          vm86old
241 114     STD             { int linux_sys_wait4(int pid, int *status, \
242                             int options, struct rusage *rusage); }
243 115     STD             { int linux_sys_swapoff(const char *path); }
244 116     STD             { int linux_sys_sysinfo(struct linux_sysinfo *arg); }
245 117     STD             { int linux_sys_ipc(int what, int a1, int a2, int a3, \
246                             void *ptr); }
247 118     NOARGS          { int sys_fsync(int fd); }
248 119     STD             { int linux_sys_sigreturn(struct linux_sigcontext *scp); }
249 120     STD             { int linux_sys_clone(int flags, void *stack); }
250 121     STD             { int linux_sys_setdomainname(char *domainname, \
251                             int len); }
252 122     STD             { int linux_sys_new_uname(struct linux_utsname *up); }
253 123     UNIMPL          modify_ldt
254 124     UNIMPL          adjtimex
255 125     STD             { int linux_sys_mprotect(const void *start, \
256                             unsigned long len, int prot); }
257 126     STD             { int linux_sys_sigprocmask(int how, \
258                             const linux_old_sigset_t *set, \
259                             linux_old_sigset_t *oset); }
260 127     UNIMPL          create_module
261 128     UNIMPL          init_module
262 129     UNIMPL          delete_module
263 130     UNIMPL          get_kernel_syms
264 131     UNIMPL          quotactl
265 132     NOARGS          { pid_t sys_getpgid(pid_t pid); }
266 133     NOARGS          { int sys_fchdir(int fd); }
267 134     UNIMPL          bdflush
268 135     UNIMPL          sysfs
269 136     STD             { int linux_sys_personality(int per); }
270 137     UNIMPL          afs_syscall
271 138     STD             { int linux_sys_setfsuid(uid_t uid); }
272 139     STD             { int linux_sys_setfsgid(gid_t gid); }
273 140     STD             { int linux_sys_llseek(int fd, u_int32_t ohigh, \
274                             u_int32_t olow, void *res, int whence); }
275 141     STD             { int linux_sys_getdents(int fd, \
276                             struct linux_dirent *dent, unsigned int count); }
277 142     STD             { int linux_sys_new_select(int nfds, fd_set *readfds, \
278                             fd_set *writefds, fd_set *exceptfds, \
279                             struct timeval *timeout); }
280 143     NOARGS          { int sys_flock(int fd, int how); }
281 144     NOARGS          { int sys___msync13(void *addr, size_t len, int flags); }
282 145     NOARGS          { int sys_readv(int fd, struct iovec *iovp, \
283                                 u_int iovcnt); }
284 146     NOARGS          { int sys_writev(int fd, struct iovec *iovp, \
285                                 u_int iovcnt); }
286 147     NOARGS          { pid_t sys_getsid(pid_t pid); }
287 148     STD             { int linux_sys_fdatasync(int fd); }
288 149     STD             { int linux_sys___sysctl(struct linux___sysctl *lsp); }
289 150     NOARGS          { int sys_mlock(void *addr, size_t len); }
290 151     NOARGS          { int sys_munlock(void *addr, size_t len); }
291 152     NOARGS          { int sys_mlockall(int flags); }
292 153     NOARGS          { int sys_munlockall(void); }
293 154     STD             { int linux_sys_sched_setparam(pid_t pid, \
294                             const struct linux_sched_param *sp); }
295 155     STD             { int linux_sys_sched_getparam(pid_t pid, \
296                             struct linux_sched_param *sp); }
297 156     STD             { int linux_sys_sched_setscheduler(pid_t pid, \
298                             int policy, const struct linux_sched_param *sp); }
299 157     STD             { int linux_sys_sched_getscheduler(pid_t pid); }
300 158     STD             { int linux_sys_sched_yield(void); }
301 159     STD             { int linux_sys_sched_get_priority_max(int policy); }
302 160     STD             { int linux_sys_sched_get_priority_min(int policy); }
303 161     UNIMPL          sched_rr_get_interval
304 162     NOARGS          { int sys_nanosleep(const struct timespec *rqtp, \
305                                 struct timespec *rmtp); }
306 163     STD             { void *linux_sys_mremap(void *old_address, \
307                             size_t old_size, size_t new_size, u_long flags); }
308 164     STD             { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
309                             uid_t suid); }
310 165     STD             { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
311                             uid_t *suid); }
312 166     UNIMPL          query_module
313 167     NOARGS          { int sys_poll(struct pollfd *fds, u_int nfds, \
314                             int timeout); }
315 168     UNIMPL          nfsservctl
316 169     STD             { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
317                             gid_t sgid); }
318 170     STD             { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
319                             gid_t *sgid); }
320 171     UNIMPL          prctl
321 172     STD             { int linux_sys_rt_sigreturn( \
322                             struct linux_rt_sigframe *sfp); }
323 173     STD             { int linux_sys_rt_sigaction(int signum, \
324                             const struct linux_sigaction *nsa, \
325                             struct linux_sigaction *osa, \
326                             size_t sigsetsize); }
327 174     STD             { int linux_sys_rt_sigprocmask(int how, \
328                             const linux_sigset_t *set, \
329                             linux_sigset_t *oset, \
330                             size_t sigsetsize); }
331 175     STD             { int linux_sys_rt_sigpending( \
332                             linux_sigset_t *set, \
333                             size_t sigsetsize); }
334 176     UNIMPL          rt_sigtimedwait
335 ; XXX XAX int here?  sigset_t here?  siginfo_t
336 177     STD             { int linux_sys_rt_queueinfo(int pid, int signum, \
337                             void *uinfo); }
338 178     STD             { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
339                             size_t sigsetsize); }
340 179     STD             { int linux_sys_pread(int fd, char *buf, \
341                             size_t nbyte, linux_off_t offset); }
342 180     STD             { int linux_sys_pwrite(int fd, char *buf, \
343                             size_t nbyte, linux_off_t offset); }
344 181     NOARGS          { int sys___posix_chown(const char *path, \
345                             int uid, int gid); }
346 182     NOARGS          { int sys___getcwd(char *bufp, size_t length); }
347 183     UNIMPL          capget
348 184     UNIMPL          capset
349 185     STD             { int linux_sys_sigaltstack( \
350                             const struct linux_sigaltstack *ss, \
351                             struct linux_sigaltstack *oss); }
352 186     UNIMPL          sendfile
353 187     UNIMPL          getpmsg
354 188     UNIMPL          putpmsg
355 189     NOARGS          { int sys___vfork14(void); }
356 190     STD             { int linux_sys_ugetrlimit(int which, \
357                             struct rlimit *rlp); }
358 191     UNIMPL          /* unused */
359 #define linux_sys_mmap2_args linux_sys_mmap_args
360 192     NOARGS          { linux_off_t linux_sys_mmap2(unsigned long addr, \
361                             size_t len, int prot, int flags, int fd, \
362                             linux_off_t offset); }
363 193     STD             { int linux_sys_truncate64(const char *path, \
364                             off_t length); }
365 194     STD             { int linux_sys_ftruncate64(unsigned int fd, \
366                             off_t length); }
367 195     STD             { int linux_sys_stat64(const char *path, \
368                             struct linux_stat64 *sp); }
369 196     STD             { int linux_sys_lstat64(const char *path, \
370                             struct linux_stat64 *sp); }
371 197     STD             { int linux_sys_fstat64(int fd, \
372                             struct linux_stat64 *sp); }
373 198     UNIMPL          sys_pciconfig_read
374 199     UNIMPL          sys_pciconfig_write
375 200     UNIMPL          sys_pciconfig_iobase
376 201     UNIMPL          /* Unused (MacOnLinux project) */
377 202     STD             { int linux_sys_getdents64(int fd, \
378                             struct linux_dirent64 *dent, unsigned int count); }
379 203     UNIMPL          pivot_root
380 204     STD             { int linux_sys_fcntl64(int fd, int cmd, void *arg); }
381 205     NOARGS          { int sys_mincore(void *addr, size_t len, char *vec); }
382 206     NOARGS          { int sys_madvise(void *addr, size_t len, int behav); }
383 207     UNIMPL          gettid
384 208     UNIMPL          tkill
385 209     STD             { int linux_sys_setxattr(char *path, char *name, \
386                             void *value, size_t size, int flags); }
387 210     STD             { int linux_sys_lsetxattr(char *path, char *name, \
388                             void *value, size_t size, int flags); }
389 211     STD             { int linux_sys_fsetxattr(int fd, char *name, \
390                             void *value, size_t size, int flags); }
391 212     STD             { ssize_t linux_sys_getxattr(char *path, char *name, \
392                             void *value, size_t size); }
393 213     STD             { ssize_t linux_sys_lgetxattr(char *path, char *name, \
394                             void *value, size_t size); }
395 214     STD             { ssize_t linux_sys_fgetxattr(int fd, char *name, \
396                             void *value, size_t size); }
397 215     STD             { ssize_t linux_sys_listxattr(char *path, char *list, \
398                             size_t size); }
399 216     STD             { ssize_t linux_sys_llistxattr(char *path, char *list, \
400                             size_t size); }
401 217     STD             { ssize_t linux_sys_flistxattr(int fd, char *list, \
402                             size_t size); }
403 218     STD             { int linux_sys_removexattr(char *path, char *name); }
404 219     STD             { int linux_sys_lremovexattr(char *path, char *name); }
405 220     STD             { int linux_sys_fremovexattr(int fd, char *name); }
406 221     UNIMPL          futex
407 222     UNIMPL          sched_setaffinity
408 223     UNIMPL          sched_getaffinity
409 224     UNIMPL          /* unused */
410 225     UNIMPL          tuxcall
411 226     UNIMPL          sendfile64
412 227     UNIMPL          io_setup
413 228     UNIMPL          io_destroy
414 229     UNIMPL          io_getevents
415 230     UNIMPL          io_submit
416 231     UNIMPL          io_cancel
417 232     UNIMPL          set_tid_address
418 233     UNIMPL          fadvise64
419 234     STD             { int linux_sys_exit_group(int error_code); }
420 235     UNIMPL          lookup_dcookie
421 236     UNIMPL          epoll_create
422 237     UNIMPL          epoll_ctl
423 238     UNIMPL          epoll_wait
424 239     UNIMPL          remap_file_pages
425 240     UNIMPL          timer_create
426 241     UNIMPL          timer_settime
427 242     UNIMPL          timer_gettime
428 243     UNIMPL          timer_getoverrun
429 244     UNIMPL          timer_delete
430 245     STD             { int linux_sys_clock_settime(clockid_t which, \
431                             struct linux_timespec *tp); }
432 246     STD             { int linux_sys_clock_gettime(clockid_t which, \
433                             struct linux_timespec *tp); }
434 247     STD             { int linux_sys_clock_getres(clockid_t which, \
435                             struct linux_timespec *tp); }
436 248     STD             { int linux_sys_clock_nanosleep(clockid_t which, \
437                             int flags, struct linux_timespec *rqtp, \
438                             struct linux_timespec *rmtp); }
439 249     UNIMPL          swapcontext
440 250     UNIMPL          tgkill
441 251     UNIMPL          utimes
442 252     STD             { int linux_sys_statfs64(const char *path, \
443                             size_t sz, struct linux_statfs64 *sp); }
444 253     STD             { int linux_sys_fstatfs64(int fd, \
445                             size_t sz, struct linux_statfs64 *sp); }
446 254     UNIMPL          fadvise64_64
447 255     UNIMPL          rtas
448 256     UNIMPL          /* reserved for sys_debug_setcontext */
449 257     UNIMPL          /* reserved for vserver */
450 258     UNIMPL          /* reserved for new sys_remap_file_pages */
451 259     UNIMPL          /* reserved for new sys_mbind */
452 260     UNIMPL          /* reserved for new sys_get_mempolicy */
453 261     UNIMPL          /* reserved for new sys_set_mempolicy */
454 262     UNIMPL          mq_open
455 263     UNIMPL          mq_unlink
456 264     UNIMPL          mq_timedsend
457 265     UNIMPL          mq_timedreceive
458 266     UNIMPL          mq_notify
459 267     UNIMPL          mq_getsetattr
460 268     UNIMPL          kexec_load