X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Funistd.h;h=b5c78a4a019210cdfd9e140a2c74c3c3fd43158b;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=3690d211dcd832fd61689f4f086e909c3d5e4906;hpb=e686509282835a634ee3285c39a1b5b04ee2a88f;p=linux-2.6.git diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 3690d211d..b5c78a4a0 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -288,26 +288,52 @@ #define __NR_clock_nanosleep (__NR_Linux + 265) #define __NR_tgkill (__NR_Linux + 266) #define __NR_utimes (__NR_Linux + 267) -#define __NR_vserver (__NR_Linux + 273) -#define __NR_mbind (__NR_Linux + 274) -#define __NR_get_mempolicy (__NR_Linux + 275) -#define __NR_set_mempolicy (__NR_Linux + 276) -#define __NR_mq_open (__NR_Linux + 277) -#define __NR_mq_unlink (__NR_Linux + 278) -#define __NR_mq_timedsend (__NR_Linux + 279) -#define __NR_mq_timedreceive (__NR_Linux + 280) -#define __NR_mq_notify (__NR_Linux + 281) -#define __NR_mq_getsetattr (__NR_Linux + 282) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) +#define __NR_set_thread_area (__NR_Linux + 283) +#define __NR_inotify_init (__NR_Linux + 284) +#define __NR_inotify_add_watch (__NR_Linux + 285) +#define __NR_inotify_rm_watch (__NR_Linux + 286) +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_fstatat (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) /* * Offset of the last Linux o32 flavoured syscall */ -#define __NR_Linux_syscalls 282 +#define __NR_Linux_syscalls 303 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #define __NR_O32_Linux 4000 -#define __NR_O32_Linux_syscalls 276 +#define __NR_O32_Linux_syscalls 303 #if _MIPS_SIM == _MIPS_SIM_ABI64 @@ -551,16 +577,43 @@ #define __NR_mq_timedreceive (__NR_Linux + 233) #define __NR_mq_notify (__NR_Linux + 234) #define __NR_mq_getsetattr (__NR_Linux + 235) +#define __NR_vserver (__NR_Linux + 236) +#define __NR_waitid (__NR_Linux + 237) +/* #define __NR_sys_setaltroot (__NR_Linux + 238) */ +#define __NR_add_key (__NR_Linux + 239) +#define __NR_request_key (__NR_Linux + 240) +#define __NR_keyctl (__NR_Linux + 241) +#define __NR_set_thread_area (__NR_Linux + 242) +#define __NR_inotify_init (__NR_Linux + 243) +#define __NR_inotify_add_watch (__NR_Linux + 244) +#define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_fstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) /* - * Offset of the last Linux flavoured syscall + * Offset of the last Linux 64-bit flavoured syscall */ -#define __NR_Linux_syscalls 235 +#define __NR_Linux_syscalls 262 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ #define __NR_64_Linux 5000 -#define __NR_64_Linux_syscalls 235 +#define __NR_64_Linux_syscalls 262 #if _MIPS_SIM == _MIPS_SIM_NABI32 @@ -808,16 +861,43 @@ #define __NR_mq_timedreceive (__NR_Linux + 237) #define __NR_mq_notify (__NR_Linux + 238) #define __NR_mq_getsetattr (__NR_Linux + 239) +#define __NR_vserver (__NR_Linux + 240) +#define __NR_waitid (__NR_Linux + 241) +/* #define __NR_sys_setaltroot (__NR_Linux + 242) */ +#define __NR_add_key (__NR_Linux + 243) +#define __NR_request_key (__NR_Linux + 244) +#define __NR_keyctl (__NR_Linux + 245) +#define __NR_set_thread_area (__NR_Linux + 246) +#define __NR_inotify_init (__NR_Linux + 247) +#define __NR_inotify_add_watch (__NR_Linux + 248) +#define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_fstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) /* * Offset of the last N32 flavoured syscall */ -#define __NR_Linux_syscalls 239 +#define __NR_Linux_syscalls 266 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ #define __NR_N32_Linux 6000 -#define __NR_N32_Linux_syscalls 239 +#define __NR_N32_Linux_syscalls 266 #ifndef __ASSEMBLY__ @@ -836,12 +916,13 @@ type name(void) \ ".set\treorder" \ : "=&r" (__v0), "=r" (__a3) \ : "i" (__NR_##name) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } /* @@ -863,12 +944,13 @@ type name(atype a) \ ".set\treorder" \ : "=&r" (__v0), "=r" (__a3) \ : "r" (__a0), "i" (__NR_##name) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #define _syscall2(type,name,atype,a,btype,b) \ @@ -887,12 +969,13 @@ type name(atype a, btype b) \ ".set\treorder" \ : "=&r" (__v0), "=r" (__a3) \ : "r" (__a0), "r" (__a1), "i" (__NR_##name) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #define _syscall3(type,name,atype,a,btype,b,ctype,c) \ @@ -912,12 +995,13 @@ type name(atype a, btype b, ctype c) \ ".set\treorder" \ : "=&r" (__v0), "=r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \ @@ -937,12 +1021,13 @@ type name(atype a, btype b, ctype c, dtype d) \ ".set\treorder" \ : "=&r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #if (_MIPS_SIM == _MIPS_SIM_ABI32) @@ -973,12 +1058,13 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \ : "=&r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \ "m" ((unsigned long)e) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \ @@ -1005,12 +1091,13 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \ : "=&r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \ "m" ((unsigned long)e), "m" ((unsigned long)f) \ - : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ @@ -1033,14 +1120,15 @@ type name (atype a,btype b,ctype c,dtype d,etype e) \ "syscall\n\t" \ "move\t%0, $2\n\t" \ ".set\treorder" \ - : "=&r" (__v0), "+r" (__a3), "+r" (__a4) \ - : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \ - : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "=&r" (__v0), "+r" (__a3) \ + : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##name) \ + : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \ @@ -1063,24 +1151,27 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ : "=&r" (__v0), "+r" (__a3) \ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "r" (__a5), \ "i" (__NR_##name) \ - : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \ + : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ + "memory"); \ \ if (__a3 == 0) \ return (type) __v0; \ errno = __v0; \ - return -1; \ + return (type) -1; \ } #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ #ifdef __KERNEL__ + +#include + #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_SYS_ALARM #define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_PAUSE #define __ARCH_WANT_SYS_SGETMASK -#define __ARCH_WANT_SYS_TIME #define __ARCH_WANT_SYS_UTIME #define __ARCH_WANT_SYS_WAITPID #define __ARCH_WANT_SYS_SOCKETCALL @@ -1093,8 +1184,12 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION -# ifndef __mips64 +# ifdef CONFIG_32BIT # define __ARCH_WANT_STAT64 +# define __ARCH_WANT_SYS_TIME +# endif +# ifdef CONFIG_MIPS32_O32 +# define __ARCH_WANT_COMPAT_SYS_TIME # endif #endif @@ -1118,21 +1213,7 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ * won't be any messing with the stack from main(), but we define * some others too. */ -static inline _syscall0(pid_t,setsid) -static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) -static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) -static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) -static inline _syscall1(int,dup,int,fd) static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) -static inline _syscall3(int,open,const char *,file,int,flag,int,mode) -static inline _syscall1(int,close,int,fd) -struct rusage; -static inline _syscall4(pid_t,wait4,pid_t,pid,int *,stat_addr,int,options,struct rusage *,ru) - -static inline pid_t waitpid(int pid, int * wait_stat, int flags) -{ - return wait4(pid, wait_stat, flags, NULL); -} asmlinkage unsigned long sys_mmap( unsigned long addr, size_t len, @@ -1144,7 +1225,6 @@ asmlinkage long sys_mmap2( unsigned long fd, unsigned long pgoff); asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs); asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs); -asmlinkage int sys_ptrace(long request, long pid, long addr, long data); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, @@ -1160,6 +1240,6 @@ asmlinkage long sys_rt_sigaction(int sig, * What we want is __attribute__((weak,alias("sys_ni_syscall"))), * but it doesn't work on all toolchains, so we just do it by hand */ -#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall"); +#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall") #endif /* _ASM_UNISTD_H */