3 * Copyright (C) 1999-2004 Matthew Wilcox <willy at parisc-linux.org>
4 * Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
5 * Copyright (C) 2000 Alan Modra <amodra at parisc-linux.org>
6 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
7 * Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
8 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
9 * Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
10 * Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
11 * Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
12 * Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
13 * Copyright (C) 2001 Helge Deller <deller at parisc-linux.org>
14 * Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
15 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38 #if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
39 /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
40 * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
41 * implementation is required on wide palinux. Use ENTRY_COMP where
42 * the compatability layer has a useful 32-bit implementation.
44 #define ENTRY_SAME(_name_) .dword sys_##_name_
45 #define ENTRY_DIFF(_name_) .dword sys32_##_name_
46 #define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
47 #define ENTRY_OURS(_name_) .dword parisc_##_name_
48 #define ENTRY_COMP(_name_) .dword compat_sys_##_name_
49 #elif defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
50 #define ENTRY_SAME(_name_) .dword sys_##_name_
51 #define ENTRY_DIFF(_name_) .dword sys_##_name_
52 #define ENTRY_UHOH(_name_) .dword sys_##_name_
53 #define ENTRY_OURS(_name_) .dword sys_##_name_
54 #define ENTRY_COMP(_name_) .dword sys_##_name_
56 #define ENTRY_SAME(_name_) .word sys_##_name_
57 #define ENTRY_DIFF(_name_) .word sys_##_name_
58 #define ENTRY_UHOH(_name_) .word sys_##_name_
59 #define ENTRY_OURS(_name_) .word parisc_##_name_
60 #define ENTRY_COMP(_name_) .word sys_##_name_
63 ENTRY_SAME(restart_syscall) /* 0 */
65 ENTRY_SAME(fork_wrapper)
68 ENTRY_SAME(open) /* 5 */
73 ENTRY_SAME(unlink) /* 10 */
74 ENTRY_DIFF(execve_wrapper)
76 /* See comments in kernel/time.c!!! Maybe we don't need this? */
79 ENTRY_SAME(chmod) /* 15 */
82 /* struct stat is MAYBE identical wide and narrow ?? */
85 ENTRY_SAME(getpid) /* 20 */
86 /* the 'void * data' parameter may need re-packing in wide */
88 /* concerned about struct sockaddr in wide/narrow */
89 /* ---> I think sockaddr is OK unless the compiler packs the struct */
90 /* differently to align the char array */
94 ENTRY_COMP(stime) /* 25 */
97 /* see stat comment */
100 /* struct utimbuf uses time_t which might vary */
101 ENTRY_COMP(utime) /* 30 */
102 /* struct sockaddr... */
107 /* struct sockaddr... */
108 ENTRY_SAME(accept) /* 35 */
113 ENTRY_SAME(rmdir) /* 40 */
117 /* struct sockaddr... */
118 ENTRY_SAME(getsockname)
119 /* it seems possible brk() could return a >4G pointer... */
120 ENTRY_SAME(brk) /* 45 */
125 ENTRY_SAME(getegid) /* 50 */
128 /* struct sockaddr... */
129 ENTRY_SAME(getpeername)
131 ENTRY_COMP(fcntl) /* 55 */
132 ENTRY_SAME(socketpair)
136 ENTRY_SAME(umask) /* 60 */
141 ENTRY_SAME(getpgrp) /* 65 */
143 ENTRY_SAME(pivot_root)
144 /* I don't like this */
147 ENTRY_SAME(setreuid) /* 70 */
150 ENTRY_COMP(sigpending)
151 ENTRY_SAME(sethostname)
152 /* Following 3 have linux-common-code structs containing longs -( */
153 ENTRY_COMP(setrlimit) /* 75 */
154 ENTRY_COMP(getrlimit)
155 ENTRY_COMP(getrusage)
156 /* struct timeval and timezone are maybe?? consistent wide and narrow */
157 ENTRY_DIFF(gettimeofday)
158 ENTRY_DIFF(settimeofday)
159 ENTRY_SAME(getgroups) /* 80 */
160 ENTRY_SAME(setgroups)
161 /* struct socketaddr... */
164 /* see stat comment */
166 ENTRY_SAME(readlink) /* 85 */
167 ENTRY_SAME(ni_syscall) /* was uselib */
171 ENTRY_SAME(mmap) /* 90 */
174 ENTRY_SAME(ftruncate)
176 ENTRY_SAME(fchown) /* 95 */
177 ENTRY_SAME(getpriority)
178 ENTRY_SAME(setpriority)
181 ENTRY_COMP(fstatfs) /* 100 */
183 ENTRY_SAME(ni_syscall) /* was socketcall */
185 /* even though manpage says struct timeval contains longs, ours has
186 * time_t and suseconds_t -- both of which are safe wide/narrow */
187 ENTRY_COMP(setitimer)
188 ENTRY_COMP(getitimer) /* 105 */
193 ENTRY_SAME(getcwd) /* 110 */
196 ENTRY_SAME(vfork_wrapper)
197 /* struct rusage contains longs... */
199 ENTRY_SAME(swapoff) /* 115 */
204 ENTRY_SAME(clone_wrapper) /* 120 */
205 ENTRY_SAME(setdomainname)
207 /* struct sockaddr... */
209 /* struct timex contains longs */
211 ENTRY_SAME(mprotect) /* 125 */
212 /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
213 ENTRY_COMP(sigprocmask)
214 ENTRY_SAME(ni_syscall) /* create_module */
215 ENTRY_SAME(init_module)
216 ENTRY_SAME(delete_module)
217 ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */
218 /* time_t inside struct dqblk */
223 ENTRY_SAME(sysfs) /* 135 */
224 ENTRY_SAME(personality)
225 ENTRY_SAME(ni_syscall) /* for afs_syscall */
228 /* I think this might work */
229 ENTRY_SAME(llseek) /* 140 */
230 /* struct linux_dirent has longs, like 'unsigned long d_ino' which
231 * almost definitely should be 'ino_t d_ino' but it's too late now */
233 /* it is POSSIBLE that select will be OK because even though fd_set
234 * contains longs, the macros and sizes are clever. */
238 /* struct iovec contains pointers */
239 ENTRY_COMP(readv) /* 145 */
242 ENTRY_SAME(fdatasync)
243 /* struct __sysctl_args is a mess */
245 ENTRY_SAME(mlock) /* 150 */
248 ENTRY_SAME(munlockall)
249 /* struct sched_param is ok for now */
250 ENTRY_SAME(sched_setparam)
251 ENTRY_SAME(sched_getparam) /* 155 */
252 ENTRY_SAME(sched_setscheduler)
253 ENTRY_SAME(sched_getscheduler)
254 ENTRY_SAME(sched_yield)
255 ENTRY_SAME(sched_get_priority_max)
256 ENTRY_SAME(sched_get_priority_min) /* 160 */
257 /* These 2 would've worked if someone had defined struct timespec
258 * carefully, like timeval for example (which is about the same).
259 * Unfortunately it contains a long :-( */
260 ENTRY_DIFF(sched_rr_get_interval)
261 ENTRY_COMP(nanosleep)
263 ENTRY_SAME(setresuid)
264 ENTRY_SAME(getresuid) /* 165 */
265 ENTRY_DIFF(sigaltstack_wrapper)
266 ENTRY_SAME(ni_syscall) /* query_module */
268 /* structs contain pointers and an in_addr... */
269 ENTRY_COMP(nfsservctl)
270 ENTRY_SAME(setresgid) /* 170 */
271 ENTRY_SAME(getresgid)
273 /* signals need a careful review */
274 ENTRY_SAME(rt_sigreturn_wrapper)
275 ENTRY_DIFF(rt_sigaction)
276 ENTRY_DIFF(rt_sigprocmask) /* 175 */
277 ENTRY_DIFF(rt_sigpending)
278 ENTRY_COMP(rt_sigtimedwait)
279 /* even though the struct siginfo_t is different, it appears like
280 * all the paths use values which should be same wide and narrow.
281 * Also the struct is padded to 128 bytes which means we don't have
282 * to worry about faulting trying to copy in a larger 64-bit
283 * struct from a 32-bit user-space app.
285 ENTRY_SAME(rt_sigqueueinfo)
286 ENTRY_SAME(rt_sigsuspend_wrapper) /* not really SAME -- see the code */
287 ENTRY_SAME(chown) /* 180 */
288 /* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */
289 ENTRY_COMP(setsockopt)
290 ENTRY_SAME(getsockopt)
293 ENTRY_SAME(semop) /* 185 */
298 ENTRY_SAME(msgget) /* 190 */
303 ENTRY_SAME(shmctl) /* 195 */
304 ENTRY_SAME(ni_syscall) /* streams1 */
305 ENTRY_SAME(ni_syscall) /* streams2 */
307 ENTRY_OURS(truncate64)
308 ENTRY_OURS(ftruncate64) /* 200 */
309 ENTRY_SAME(getdents64)
311 ENTRY_SAME(ni_syscall) /* attrctl -- dead */
312 ENTRY_SAME(ni_syscall) /* acl_get -- dead */
313 ENTRY_SAME(ni_syscall) /* 205 (acl_set -- dead) */
315 ENTRY_OURS(readahead)
317 ENTRY_SAME(sendfile64)
318 ENTRY_COMP(futex) /* 210 */
319 ENTRY_COMP(sched_setaffinity)
320 ENTRY_COMP(sched_getaffinity)
321 ENTRY_SAME(ni_syscall) /* set_thread_area */
322 ENTRY_SAME(ni_syscall) /* get_thread_area */
323 ENTRY_SAME(io_setup) /* 215 */
324 ENTRY_SAME(io_destroy)
325 ENTRY_SAME(io_getevents)
326 ENTRY_SAME(io_submit)
327 ENTRY_SAME(io_cancel)
328 ENTRY_SAME(alloc_hugepages) /* 220 */
329 ENTRY_SAME(free_hugepages)
330 ENTRY_SAME(exit_group)
331 ENTRY_DIFF(lookup_dcookie)
332 ENTRY_SAME(epoll_create)
333 ENTRY_SAME(epoll_ctl) /* 225 */
334 ENTRY_SAME(epoll_wait)
335 ENTRY_SAME(remap_file_pages)
336 ENTRY_SAME(semtimedop)
338 ENTRY_SAME(mq_unlink) /* 230 */
339 ENTRY_SAME(mq_timedsend)
340 ENTRY_SAME(mq_timedreceive)
341 ENTRY_SAME(mq_notify)
342 ENTRY_SAME(mq_getsetattr)
343 ENTRY_COMP(waitid) /* 235 */
344 ENTRY_OURS(fadvise64_64)
345 ENTRY_SAME(set_tid_address)
347 ENTRY_SAME(lsetxattr)
348 ENTRY_SAME(fsetxattr) /* 240 */
350 ENTRY_SAME(lgetxattr)
351 ENTRY_SAME(fgetxattr)
352 ENTRY_SAME(listxattr)
353 ENTRY_SAME(llistxattr) /* 245 */
354 ENTRY_SAME(flistxattr)
355 ENTRY_SAME(removexattr)
356 ENTRY_SAME(lremovexattr)
357 ENTRY_SAME(fremovexattr)
358 ENTRY_COMP(timer_create) /* 250 */
359 ENTRY_COMP(timer_settime)
360 ENTRY_COMP(timer_gettime)
361 ENTRY_SAME(timer_getoverrun)
362 ENTRY_SAME(timer_delete)
363 ENTRY_COMP(clock_settime) /* 255 */
364 ENTRY_COMP(clock_gettime)
365 ENTRY_COMP(clock_getres)
366 ENTRY_COMP(clock_nanosleep)
368 ENTRY_COMP(mbind) /* 260 */
369 ENTRY_COMP(get_mempolicy)
370 ENTRY_COMP(set_mempolicy)
371 ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */
373 ENTRY_SAME(request_key) /* 265 */
375 ENTRY_SAME(ioprio_set)
376 ENTRY_SAME(ioprio_get)
377 ENTRY_SAME(inotify_init)
378 ENTRY_SAME(inotify_add_watch) /* 270 */
379 ENTRY_SAME(inotify_rm_watch)
380 ENTRY_SAME(ni_syscall) /* 271 ENTRY_COMP(pselect6) */
381 ENTRY_SAME(ni_syscall) /* 272 ENTRY_COMP(ppoll) */
382 ENTRY_SAME(migrate_pages)
383 ENTRY_COMP(openat) /* 275 */
387 ENTRY_COMP(futimesat)
388 ENTRY_SAME(fstatat64) /* 280 */
392 ENTRY_SAME(symlinkat)
393 ENTRY_SAME(readlinkat) /* 285 */
395 ENTRY_SAME(faccessat)