aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-xtensa/unistd.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2005-07-07 20:56:53 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:44 -0400
commit8759145114f72857bcaeed338db21620a6619b26 (patch)
treea7a1ddd9c16f4d4669497db0f9f6e77e6d163f72 /include/asm-xtensa/unistd.h
parent605a69ac81249cca531cdc6b3e695f15dda63102 (diff)
[PATCH] xtensa: remove old syscalls
xtensa is now in -rc1, with the obsolete syscalls still in there, so I guess this about the last chance to correct the ABI. Applying the patch obviously breaks all sorts of user space binaries and probably also requires the appropriate changes to be made to libc. On the other hand, if a decision is made to keep the broken interface, it should at least be a conscious one instead of an oversight. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-xtensa/unistd.h')
-rw-r--r--include/asm-xtensa/unistd.h98
1 files changed, 0 insertions, 98 deletions
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h
index 64c64dd83ba4..6b39d6609d9c 100644
--- a/include/asm-xtensa/unistd.h
+++ b/include/asm-xtensa/unistd.h
@@ -13,42 +13,31 @@
13 13
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15 15
16//#define __NR_setup 0 /* used only by init, to get system going */
17#define __NR_spill 0 16#define __NR_spill 0
18#define __NR_exit 1 17#define __NR_exit 1
19#define __NR_fork 2
20#define __NR_read 3 18#define __NR_read 3
21#define __NR_write 4 19#define __NR_write 4
22#define __NR_open 5 20#define __NR_open 5
23#define __NR_close 6 21#define __NR_close 6
24#define __NR_waitpid 7
25#define __NR_creat 8 22#define __NR_creat 8
26#define __NR_link 9 23#define __NR_link 9
27#define __NR_unlink 10 24#define __NR_unlink 10
28#define __NR_execve 11 25#define __NR_execve 11
29#define __NR_chdir 12 26#define __NR_chdir 12
30#define __NR_time 13
31#define __NR_mknod 14 27#define __NR_mknod 14
32#define __NR_chmod 15 28#define __NR_chmod 15
33#define __NR_lchown 16 29#define __NR_lchown 16
34#define __NR_break 17 30#define __NR_break 17
35#define __NR_oldstat 18
36#define __NR_lseek 19 31#define __NR_lseek 19
37#define __NR_getpid 20 32#define __NR_getpid 20
38#define __NR_mount 21 33#define __NR_mount 21
39#define __NR_oldumount 22
40#define __NR_setuid 23 34#define __NR_setuid 23
41#define __NR_getuid 24 35#define __NR_getuid 24
42#define __NR_stime 25
43#define __NR_ptrace 26 36#define __NR_ptrace 26
44#define __NR_alarm 27
45#define __NR_oldfstat 28
46#define __NR_pause 29
47#define __NR_utime 30 37#define __NR_utime 30
48#define __NR_stty 31 38#define __NR_stty 31
49#define __NR_gtty 32 39#define __NR_gtty 32
50#define __NR_access 33 40#define __NR_access 33
51#define __NR_nice 34
52#define __NR_ftime 35 41#define __NR_ftime 35
53#define __NR_sync 36 42#define __NR_sync 36
54#define __NR_kill 37 43#define __NR_kill 37
@@ -66,24 +55,18 @@
66#define __NR_geteuid 49 55#define __NR_geteuid 49
67#define __NR_getegid 50 56#define __NR_getegid 50
68#define __NR_acct 51 57#define __NR_acct 51
69#define __NR_umount 52
70#define __NR_lock 53 58#define __NR_lock 53
71#define __NR_ioctl 54 59#define __NR_ioctl 54
72#define __NR_fcntl 55 60#define __NR_fcntl 55
73#define __NR_mpx 56
74#define __NR_setpgid 57 61#define __NR_setpgid 57
75#define __NR_ulimit 58 62#define __NR_ulimit 58
76#define __NR_oldolduname 59
77#define __NR_umask 60 63#define __NR_umask 60
78#define __NR_chroot 61 64#define __NR_chroot 61
79#define __NR_ustat 62 65#define __NR_ustat 62
80#define __NR_dup2 63 66#define __NR_dup2 63
81#define __NR_getppid 64 67#define __NR_getppid 64
82#define __NR_getpgrp 65
83#define __NR_setsid 66 68#define __NR_setsid 66
84#define __NR_sigaction 67 69#define __NR_sigaction 67
85#define __NR_sgetmask 68
86#define __NR_ssetmask 69
87#define __NR_setreuid 70 70#define __NR_setreuid 70
88#define __NR_setregid 71 71#define __NR_setregid 71
89#define __NR_sigsuspend 72 72#define __NR_sigsuspend 72
@@ -98,13 +81,10 @@
98#define __NR_setgroups 81 81#define __NR_setgroups 81
99#define __NR_select 82 82#define __NR_select 82
100#define __NR_symlink 83 83#define __NR_symlink 83
101#define __NR_oldlstat 84
102#define __NR_readlink 85 84#define __NR_readlink 85
103#define __NR_uselib 86 85#define __NR_uselib 86
104#define __NR_swapon 87 86#define __NR_swapon 87
105#define __NR_reboot 88 87#define __NR_reboot 88
106#define __NR_readdir 89
107#define __NR_mmap 90
108#define __NR_munmap 91 88#define __NR_munmap 91
109#define __NR_truncate 92 89#define __NR_truncate 92
110#define __NR_ftruncate 93 90#define __NR_ftruncate 93
@@ -116,22 +96,18 @@
116#define __NR_statfs 99 96#define __NR_statfs 99
117#define __NR_fstatfs 100 97#define __NR_fstatfs 100
118#define __NR_ioperm 101 98#define __NR_ioperm 101
119#define __NR_socketcall 102
120#define __NR_syslog 103 99#define __NR_syslog 103
121#define __NR_setitimer 104 100#define __NR_setitimer 104
122#define __NR_getitimer 105 101#define __NR_getitimer 105
123#define __NR_stat 106 102#define __NR_stat 106
124#define __NR_lstat 107 103#define __NR_lstat 107
125#define __NR_fstat 108 104#define __NR_fstat 108
126#define __NR_olduname 109
127#define __NR_iopl 110 105#define __NR_iopl 110
128#define __NR_vhangup 111 106#define __NR_vhangup 111
129#define __NR_idle 112 107#define __NR_idle 112
130#define __NR_vm86 113
131#define __NR_wait4 114 108#define __NR_wait4 114
132#define __NR_swapoff 115 109#define __NR_swapoff 115
133#define __NR_sysinfo 116 110#define __NR_sysinfo 116
134#define __NR_ipc 117
135#define __NR_fsync 118 111#define __NR_fsync 118
136#define __NR_sigreturn 119 112#define __NR_sigreturn 119
137#define __NR_clone 120 113#define __NR_clone 120
@@ -140,18 +116,15 @@
140#define __NR_modify_ldt 123 116#define __NR_modify_ldt 123
141#define __NR_adjtimex 124 117#define __NR_adjtimex 124
142#define __NR_mprotect 125 118#define __NR_mprotect 125
143#define __NR_sigprocmask 126
144#define __NR_create_module 127 119#define __NR_create_module 127
145#define __NR_init_module 128 120#define __NR_init_module 128
146#define __NR_delete_module 129 121#define __NR_delete_module 129
147#define __NR_get_kernel_syms 130
148#define __NR_quotactl 131 122#define __NR_quotactl 131
149#define __NR_getpgid 132 123#define __NR_getpgid 132
150#define __NR_fchdir 133 124#define __NR_fchdir 133
151#define __NR_bdflush 134 125#define __NR_bdflush 134
152#define __NR_sysfs 135 126#define __NR_sysfs 135
153#define __NR_personality 136 127#define __NR_personality 136
154#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
155#define __NR_setfsuid 138 128#define __NR_setfsuid 138
156#define __NR_setfsgid 139 129#define __NR_setfsgid 139
157#define __NR__llseek 140 130#define __NR__llseek 140
@@ -222,8 +195,6 @@
222#define __NR_capset 205 195#define __NR_capset 205
223#define __NR_sigaltstack 206 196#define __NR_sigaltstack 206
224#define __NR_sendfile 207 197#define __NR_sendfile 207
225#define __NR_streams1 208 /* some people actually want it */
226#define __NR_streams2 209 /* some people actually want it */
227#define __NR_mmap2 210 198#define __NR_mmap2 210
228#define __NR_truncate64 211 199#define __NR_truncate64 211
229#define __NR_ftruncate64 212 200#define __NR_ftruncate64 212
@@ -234,7 +205,6 @@
234#define __NR_mincore 217 205#define __NR_mincore 217
235#define __NR_madvise 218 206#define __NR_madvise 218
236#define __NR_getdents64 219 207#define __NR_getdents64 219
237#define __NR_vfork 220
238 208
239/* Keep this last; should always equal the last valid call number. */ 209/* Keep this last; should always equal the last valid call number. */
240#define __NR_Linux_syscalls 220 210#define __NR_Linux_syscalls 220
@@ -448,55 +418,7 @@ __syscall_return(type,__res); \
448 418
449 419
450#ifdef __KERNEL_SYSCALLS__ 420#ifdef __KERNEL_SYSCALLS__
451
452#include <linux/compiler.h>
453#include <linux/types.h>
454#include <linux/syscalls.h>
455
456/*
457 * we need this inline - forking from kernel space will result
458 * in NO COPY ON WRITE (!!!), until an execve is executed. This
459 * is no problem, but for the stack. This is handled by not letting
460 * main() use the stack at all after fork(). Thus, no function
461 * calls - which means inline code for fork too, as otherwise we
462 * would use the stack upon exit from 'fork()'.
463 *
464 * Actually only pause and fork are needed inline, so that there
465 * won't be any messing with the stack from main(), but we define
466 * some others too.
467 */
468
469#define __NR__exit __NR_exit
470
471static __inline__ _syscall0(int,pause)
472//static __inline__ _syscall1(int,setup,int,magic) FIXME
473static __inline__ _syscall0(int,sync)
474static __inline__ _syscall0(pid_t,setsid)
475static __inline__ _syscall3(int,write,int,fd,const char *,buf,off_t,count)
476static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count)
477static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
478static __inline__ _syscall1(int,dup,int,fd)
479static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) 421static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp)
480static __inline__ _syscall3(int,open,const char *,file,int,flag,int,mode)
481static __inline__ _syscall1(int,close,int,fd)
482static __inline__ _syscall1(int,_exit,int,exitcode)
483static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
484static __inline__ _syscall1(int,delete_module,const char *,name)
485
486struct stat;
487static __inline__ _syscall2(int,fstat,int,fd,struct stat *,buf)
488static __inline__ _syscall0(pid_t,getpid)
489static __inline__ _syscall2(int,kill,int,pid,int,sig)
490static __inline__ _syscall2(int,stat,const char *, path,struct stat *,buf)
491static __inline__ _syscall1(int,unlink,char *,pathname)
492
493
494
495extern pid_t waitpid(int, int*, int );
496static __inline__ pid_t wait(int * wait_stat)
497{
498 return waitpid(-1,wait_stat,0);
499}
500#endif 422#endif
501 423
502/* 424/*
@@ -508,30 +430,10 @@ static __inline__ pid_t wait(int * wait_stat)
508#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); 430#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
509 431
510#ifdef __KERNEL__ 432#ifdef __KERNEL__
511#define __ARCH_WANT_IPC_PARSE_VERSION
512#define __ARCH_WANT_OLD_READDIR
513#define __ARCH_WANT_OLD_STAT
514#define __ARCH_WANT_STAT64 433#define __ARCH_WANT_STAT64
515#define __ARCH_WANT_SYS_ALARM
516#define __ARCH_WANT_SYS_GETHOSTNAME
517#define __ARCH_WANT_SYS_PAUSE
518#define __ARCH_WANT_SYS_SGETMASK
519#define __ARCH_WANT_SYS_SIGNAL
520#define __ARCH_WANT_SYS_TIME
521#define __ARCH_WANT_SYS_UTIME 434#define __ARCH_WANT_SYS_UTIME
522#define __ARCH_WANT_SYS_WAITPID
523#define __ARCH_WANT_SYS_SOCKETCALL
524#define __ARCH_WANT_SYS_FADVISE64
525#define __ARCH_WANT_SYS_GETPGRP
526#define __ARCH_WANT_SYS_LLSEEK 435#define __ARCH_WANT_SYS_LLSEEK
527#define __ARCH_WANT_SYS_NICE
528#define __ARCH_WANT_SYS_OLD_GETRLIMIT
529#define __ARCH_WANT_SYS_OLDUMOUNT
530#define __ARCH_WANT_SYS_SIGPENDING
531#define __ARCH_WANT_SYS_SIGPROCMASK
532#define __ARCH_WANT_SYS_RT_SIGACTION 436#define __ARCH_WANT_SYS_RT_SIGACTION
533#endif 437#endif
534 438
535
536
537#endif /* _XTENSA_UNISTD_H */ 439#endif /* _XTENSA_UNISTD_H */