aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-10-02 05:18:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:23 -0400
commit135ab6ec8fdad6f61aabe53f456821baf4a4aa0e (patch)
tree22a46321949e6621e95f6c21a3d34e3516d07cc8 /include
parent821278a75d270048e291fcbec9304439a176ba88 (diff)
[PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references
The last in-kernel user of errno is gone, so we should remove the definition and everything referring to it. This also removes the now-unused lib/execve.c file that was introduced earlier. Also remove every trace of __KERNEL_SYSCALLS__ that still remained in the kernel. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Andi Kleen <ak@muc.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Cc: David Howells <dhowells@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Hirokazu Takata <takata.hirokazu@renesas.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Cc: Richard Curnow <rc@rc0.org.uk> Cc: William Lee Irwin III <wli@holomorphy.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Cc: Chris Zankel <chris@zankel.net> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-cris/unistd.h61
-rw-r--r--include/asm-frv/unistd.h25
-rw-r--r--include/asm-h8300/unistd.h51
-rw-r--r--include/asm-i386/unistd.h39
-rw-r--r--include/asm-m32r/unistd.h37
-rw-r--r--include/asm-m68k/unistd.h6
-rw-r--r--include/asm-m68knommu/unistd.h55
-rw-r--r--include/asm-mips/unistd.h39
-rw-r--r--include/asm-s390/unistd.h51
-rw-r--r--include/asm-sh/unistd.h70
-rw-r--r--include/asm-sh64/unistd.h41
-rw-r--r--include/asm-sparc/unistd.h47
-rw-r--r--include/asm-sparc64/unistd.h42
-rw-r--r--include/asm-v850/unistd.h51
-rw-r--r--include/asm-xtensa/unistd.h5
-rw-r--r--include/linux/unistd.h6
16 files changed, 1 insertions, 625 deletions
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 7372efae0516..7c90fa970c38 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -322,67 +322,6 @@
322#define __ARCH_WANT_SYS_SIGPROCMASK 322#define __ARCH_WANT_SYS_SIGPROCMASK
323#define __ARCH_WANT_SYS_RT_SIGACTION 323#define __ARCH_WANT_SYS_RT_SIGACTION
324 324
325#ifdef __KERNEL_SYSCALLS__
326
327#include <linux/compiler.h>
328#include <linux/types.h>
329#include <linux/linkage.h>
330
331/*
332 * we need this inline - forking from kernel space will result
333 * in NO COPY ON WRITE (!!!), until an execve is executed. This
334 * is no problem, but for the stack. This is handled by not letting
335 * main() use the stack at all after fork(). Thus, no function
336 * calls - which means inline code for fork too, as otherwise we
337 * would use the stack upon exit from 'fork()'.
338 *
339 * Actually only pause and fork are needed inline, so that there
340 * won't be any messing with the stack from main(), but we define
341 * some others too.
342 */
343#define __NR__exit __NR_exit
344static inline _syscall0(pid_t,setsid)
345static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
346static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
347static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
348static inline _syscall1(int,dup,int,fd)
349static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
350static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
351static inline _syscall1(int,close,int,fd)
352
353struct pt_regs;
354asmlinkage long sys_mmap2(
355 unsigned long addr, unsigned long len,
356 unsigned long prot, unsigned long flags,
357 unsigned long fd, unsigned long pgoff);
358asmlinkage int sys_execve(const char *fname, char **argv, char **envp,
359 long r13, long mof, long srp, struct pt_regs *regs);
360asmlinkage int sys_clone(unsigned long newusp, unsigned long flags,
361 int* parent_tid, int* child_tid, long mof, long srp,
362 struct pt_regs *regs);
363asmlinkage int sys_fork(long r10, long r11, long r12, long r13,
364 long mof, long srp, struct pt_regs *regs);
365asmlinkage int sys_vfork(long r10, long r11, long r12, long r13,
366 long mof, long srp, struct pt_regs *regs);
367asmlinkage int sys_pipe(unsigned long __user *fildes);
368struct sigaction;
369asmlinkage long sys_rt_sigaction(int sig,
370 const struct sigaction __user *act,
371 struct sigaction __user *oact,
372 size_t sigsetsize);
373
374/*
375 * Since we define it "external", it collides with the built-in
376 * definition, which has the "noreturn" attribute and will cause
377 * complaints. We don't want to use -fno-builtin, so just use a
378 * different name when in the kernel.
379 */
380#define _exit kernel_syscall_exit
381static inline _syscall1(int,_exit,int,exitcode)
382static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
383#endif /* __KERNEL_SYSCALLS__ */
384
385
386/* 325/*
387 * "Conditional" syscalls 326 * "Conditional" syscalls
388 * 327 *
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index d104d1b91d39..725e854928cf 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -440,31 +440,6 @@ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg
440 __syscall_return(type, __sc0); \ 440 __syscall_return(type, __sc0); \
441} 441}
442 442
443
444#ifdef __KERNEL_SYSCALLS__
445
446#include <linux/compiler.h>
447#include <linux/types.h>
448#include <linux/linkage.h>
449#include <asm/ptrace.h>
450
451/*
452 * we need this inline - forking from kernel space will result
453 * in NO COPY ON WRITE (!!!), until an execve is executed. This
454 * is no problem, but for the stack. This is handled by not letting
455 * main() use the stack at all after fork(). Thus, no function
456 * calls - which means inline code for fork too, as otherwise we
457 * would use the stack upon exit from 'fork()'.
458 *
459 * Actually only pause and fork are needed inline, so that there
460 * won't be any messing with the stack from main(), but we define
461 * some others too.
462 */
463#define __NR__exit __NR_exit
464static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
465
466#endif /* __KERNEL_SYSCALLS__ */
467
468#define __ARCH_WANT_IPC_PARSE_VERSION 443#define __ARCH_WANT_IPC_PARSE_VERSION
469/* #define __ARCH_WANT_OLD_READDIR */ 444/* #define __ARCH_WANT_OLD_READDIR */
470#define __ARCH_WANT_OLD_STAT 445#define __ARCH_WANT_OLD_STAT
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
index a2dd90462d80..747788d629ae 100644
--- a/include/asm-h8300/unistd.h
+++ b/include/asm-h8300/unistd.h
@@ -485,57 +485,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \
485#define __ARCH_WANT_SYS_SIGPROCMASK 485#define __ARCH_WANT_SYS_SIGPROCMASK
486#define __ARCH_WANT_SYS_RT_SIGACTION 486#define __ARCH_WANT_SYS_RT_SIGACTION
487 487
488#ifdef __KERNEL_SYSCALLS__
489
490#include <linux/compiler.h>
491#include <linux/types.h>
492
493/*
494 * we need this inline - forking from kernel space will result
495 * in NO COPY ON WRITE (!!!), until an execve is executed. This
496 * is no problem, but for the stack. This is handled by not letting
497 * main() use the stack at all after fork(). Thus, no function
498 * calls - which means inline code for fork too, as otherwise we
499 * would use the stack upon exit from 'fork()'.
500 *
501 * Actually only pause and fork are needed inline, so that there
502 * won't be any messing with the stack from main(), but we define
503 * some others too.
504 */
505#define __NR__exit __NR_exit
506static inline _syscall0(int,pause)
507static inline _syscall0(int,sync)
508static inline _syscall0(pid_t,setsid)
509static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
510static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
511static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
512static inline _syscall1(int,dup,int,fd)
513static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
514static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
515static inline _syscall1(int,close,int,fd)
516static inline _syscall1(int,_exit,int,exitcode)
517static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
518static inline _syscall1(int,delete_module,const char *,name)
519
520static inline pid_t wait(int * wait_stat)
521{
522 return waitpid(-1,wait_stat,0);
523}
524
525asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
526 unsigned long prot, unsigned long flags,
527 unsigned long fd, unsigned long pgoff);
528asmlinkage int sys_execve(char *name, char **argv, char **envp,
529 int dummy, ...);
530asmlinkage int sys_pipe(unsigned long *fildes);
531struct sigaction;
532asmlinkage long sys_rt_sigaction(int sig,
533 const struct sigaction __user *act,
534 struct sigaction __user *oact,
535 size_t sigsetsize);
536
537#endif /* __KERNEL_SYSCALLS__ */
538
539/* 488/*
540 * "Conditional" syscalls 489 * "Conditional" syscalls
541 */ 490 */
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index bd9987087adc..3ca7ab963d7d 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -451,45 +451,6 @@ __syscall_return(type,__res); \
451#define __ARCH_WANT_SYS_RT_SIGACTION 451#define __ARCH_WANT_SYS_RT_SIGACTION
452#define __ARCH_WANT_SYS_RT_SIGSUSPEND 452#define __ARCH_WANT_SYS_RT_SIGSUSPEND
453 453
454#ifdef __KERNEL_SYSCALLS__
455
456#include <linux/compiler.h>
457#include <linux/types.h>
458#include <linux/linkage.h>
459#include <asm/ptrace.h>
460
461/*
462 * we need this inline - forking from kernel space will result
463 * in NO COPY ON WRITE (!!!), until an execve is executed. This
464 * is no problem, but for the stack. This is handled by not letting
465 * main() use the stack at all after fork(). Thus, no function
466 * calls - which means inline code for fork too, as otherwise we
467 * would use the stack upon exit from 'fork()'.
468 *
469 * Actually only pause and fork are needed inline, so that there
470 * won't be any messing with the stack from main(), but we define
471 * some others too.
472 */
473static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
474
475asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount);
476asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
477 unsigned long prot, unsigned long flags,
478 unsigned long fd, unsigned long pgoff);
479asmlinkage int sys_execve(struct pt_regs regs);
480asmlinkage int sys_clone(struct pt_regs regs);
481asmlinkage int sys_fork(struct pt_regs regs);
482asmlinkage int sys_vfork(struct pt_regs regs);
483asmlinkage int sys_pipe(unsigned long __user *fildes);
484asmlinkage long sys_iopl(unsigned long unused);
485struct sigaction;
486asmlinkage long sys_rt_sigaction(int sig,
487 const struct sigaction __user *act,
488 struct sigaction __user *oact,
489 size_t sigsetsize);
490
491#endif /* __KERNEL_SYSCALLS__ */
492
493/* 454/*
494 * "Conditional" syscalls 455 * "Conditional" syscalls
495 * 456 *
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index 5c6a9ac6cf1a..95aa34298d82 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -424,43 +424,6 @@ __syscall_return(type,__res); \
424#define __ARCH_WANT_SYS_OLDUMOUNT 424#define __ARCH_WANT_SYS_OLDUMOUNT
425#define __ARCH_WANT_SYS_RT_SIGACTION 425#define __ARCH_WANT_SYS_RT_SIGACTION
426 426
427#ifdef __KERNEL_SYSCALLS__
428
429#include <linux/compiler.h>
430#include <linux/types.h>
431#include <linux/linkage.h>
432#include <asm/ptrace.h>
433
434/*
435 * we need this inline - forking from kernel space will result
436 * in NO COPY ON WRITE (!!!), until an execve is executed. This
437 * is no problem, but for the stack. This is handled by not letting
438 * main() use the stack at all after fork(). Thus, no function
439 * calls - which means inline code for fork too, as otherwise we
440 * would use the stack upon exit from 'fork()'.
441 *
442 * Actually only pause and fork are needed inline, so that there
443 * won't be any messing with the stack from main(), but we define
444 * some others too.
445 */
446static __inline__ _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
447
448asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
449 unsigned long prot, unsigned long flags,
450 unsigned long fd, unsigned long pgoff);
451asmlinkage int sys_execve(struct pt_regs regs);
452asmlinkage int sys_clone(struct pt_regs regs);
453asmlinkage int sys_fork(struct pt_regs regs);
454asmlinkage int sys_vfork(struct pt_regs regs);
455asmlinkage int sys_pipe(unsigned long __user *fildes);
456struct sigaction;
457asmlinkage long sys_rt_sigaction(int sig,
458 const struct sigaction __user *act,
459 struct sigaction __user *oact,
460 size_t sigsetsize);
461
462#endif /* __KERNEL_SYSCALLS__ */
463
464/* 427/*
465 * "Conditional" syscalls 428 * "Conditional" syscalls
466 * 429 *
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index 751632b904db..3ab716f0fc18 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -409,12 +409,6 @@ __syscall_return(type,__res); \
409#define __ARCH_WANT_SYS_SIGPROCMASK 409#define __ARCH_WANT_SYS_SIGPROCMASK
410#define __ARCH_WANT_SYS_RT_SIGACTION 410#define __ARCH_WANT_SYS_RT_SIGACTION
411 411
412#ifdef __KERNEL_SYSCALLS__
413
414static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
415
416#endif /* __KERNEL_SYSCALLS__ */
417
418/* 412/*
419 * "Conditional" syscalls 413 * "Conditional" syscalls
420 * 414 *
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index 21fdc37c5c2c..daafb5d43ef1 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -463,61 +463,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \
463#define __ARCH_WANT_SYS_SIGPROCMASK 463#define __ARCH_WANT_SYS_SIGPROCMASK
464#define __ARCH_WANT_SYS_RT_SIGACTION 464#define __ARCH_WANT_SYS_RT_SIGACTION
465 465
466#ifdef __KERNEL_SYSCALLS__
467
468#include <linux/compiler.h>
469#include <linux/interrupt.h>
470#include <linux/types.h>
471
472/*
473 * we need this inline - forking from kernel space will result
474 * in NO COPY ON WRITE (!!!), until an execve is executed. This
475 * is no problem, but for the stack. This is handled by not letting
476 * main() use the stack at all after fork(). Thus, no function
477 * calls - which means inline code for fork too, as otherwise we
478 * would use the stack upon exit from 'fork()'.
479 *
480 * Actually only pause and fork are needed inline, so that there
481 * won't be any messing with the stack from main(), but we define
482 * some others too.
483 */
484#define __NR__exit __NR_exit
485static inline _syscall0(int,pause)
486static inline _syscall0(int,sync)
487static inline _syscall0(pid_t,setsid)
488static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
489static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
490static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
491static inline _syscall1(int,dup,int,fd)
492static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
493static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
494static inline _syscall1(int,close,int,fd)
495static inline _syscall1(int,_exit,int,exitcode)
496static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
497static inline _syscall1(int,delete_module,const char *,name)
498
499static inline pid_t wait(int * wait_stat)
500{
501 return waitpid(-1,wait_stat,0);
502}
503asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
504 unsigned long prot, unsigned long flags,
505 unsigned long fd, unsigned long pgoff);
506asmlinkage int sys_execve(char *name, char **argv, char **envp);
507asmlinkage int sys_pipe(unsigned long *fildes);
508struct pt_regs;
509int sys_request_irq(unsigned int,
510 irqreturn_t (*)(int, void *, struct pt_regs *),
511 unsigned long, const char *, void *);
512void sys_free_irq(unsigned int, void *);
513struct sigaction;
514asmlinkage long sys_rt_sigaction(int sig,
515 const struct sigaction __user *act,
516 struct sigaction __user *oact,
517 size_t sigsetsize);
518
519#endif /* __KERNEL_SYSCALLS__ */
520
521/* 466/*
522 * "Conditional" syscalls 467 * "Conditional" syscalls
523 * 468 *
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index c39142920fe6..685c91467e63 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -1212,45 +1212,6 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \
1212# define __ARCH_WANT_COMPAT_SYS_TIME 1212# define __ARCH_WANT_COMPAT_SYS_TIME
1213# endif 1213# endif
1214 1214
1215#ifdef __KERNEL_SYSCALLS__
1216
1217#include <linux/compiler.h>
1218#include <linux/types.h>
1219#include <linux/linkage.h>
1220#include <asm/ptrace.h>
1221#include <asm/sim.h>
1222
1223/*
1224 * we need this inline - forking from kernel space will result
1225 * in NO COPY ON WRITE (!!!), until an execve is executed. This
1226 * is no problem, but for the stack. This is handled by not letting
1227 * main() use the stack at all after fork(). Thus, no function
1228 * calls - which means inline code for fork too, as otherwise we
1229 * would use the stack upon exit from 'fork()'.
1230 *
1231 * Actually only pause and fork are needed inline, so that there
1232 * won't be any messing with the stack from main(), but we define
1233 * some others too.
1234 */
1235static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
1236
1237asmlinkage unsigned long sys_mmap(
1238 unsigned long addr, size_t len,
1239 int prot, int flags,
1240 int fd, off_t offset);
1241asmlinkage long sys_mmap2(
1242 unsigned long addr, unsigned long len,
1243 unsigned long prot, unsigned long flags,
1244 unsigned long fd, unsigned long pgoff);
1245asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs);
1246asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs);
1247struct sigaction;
1248asmlinkage long sys_rt_sigaction(int sig,
1249 const struct sigaction __user *act,
1250 struct sigaction __user *oact,
1251 size_t sigsetsize);
1252
1253#endif /* __KERNEL_SYSCALLS__ */
1254#endif /* !__ASSEMBLY__ */ 1215#endif /* !__ASSEMBLY__ */
1255 1216
1256/* 1217/*
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 0361ac5dcde3..0cccfd83c457 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -523,57 +523,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
523# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 523# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
524# endif 524# endif
525 525
526#ifdef __KERNEL_SYSCALLS__
527
528#include <linux/compiler.h>
529#include <linux/types.h>
530#include <asm/ptrace.h>
531#include <asm/stat.h>
532#include <linux/syscalls.h>
533
534/*
535 * we need this inline - forking from kernel space will result
536 * in NO COPY ON WRITE (!!!), until an execve is executed. This
537 * is no problem, but for the stack. This is handled by not letting
538 * main() use the stack at all after fork(). Thus, no function
539 * calls - which means inline code for fork too, as otherwise we
540 * would use the stack upon exit from 'fork()'.
541 *
542 * Actually only pause and fork are needed inline, so that there
543 * won't be any messing with the stack from main(), but we define
544 * some others too.
545 */
546#define __NR__exit __NR_exit
547static inline _syscall0(pid_t,setsid)
548static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
549static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
550static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
551static inline _syscall1(int,dup,int,fd)
552static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
553static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
554static inline _syscall1(int,close,int,fd)
555static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf)
556
557static inline pid_t waitpid(int pid, int *wait_stat, int flags)
558{
559 return sys_wait4(pid, wait_stat, flags, NULL);
560}
561struct mmap_arg_struct;
562asmlinkage long sys_mmap2(struct mmap_arg_struct __user *arg);
563
564asmlinkage long sys_execve(struct pt_regs regs);
565asmlinkage long sys_clone(struct pt_regs regs);
566asmlinkage long sys_fork(struct pt_regs regs);
567asmlinkage long sys_vfork(struct pt_regs regs);
568asmlinkage long sys_pipe(unsigned long __user *fildes);
569struct sigaction;
570asmlinkage long sys_rt_sigaction(int sig,
571 const struct sigaction __user *act,
572 struct sigaction __user *oact,
573 size_t sigsetsize);
574
575#endif /* __KERNEL_SYSCALLS__ */
576
577/* 526/*
578 * "Conditional" syscalls 527 * "Conditional" syscalls
579 * 528 *
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index 5d5e9f94def5..f1a0cbc966be 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -472,76 +472,6 @@ __syscall_return(type,__sc0); \
472#define __ARCH_WANT_SYS_RT_SIGACTION 472#define __ARCH_WANT_SYS_RT_SIGACTION
473#define __ARCH_WANT_SYS_RT_SIGSUSPEND 473#define __ARCH_WANT_SYS_RT_SIGSUSPEND
474 474
475#ifdef __KERNEL_SYSCALLS__
476
477#include <linux/compiler.h>
478#include <linux/types.h>
479#include <linux/linkage.h>
480#include <asm/ptrace.h>
481
482/*
483 * we need this inline - forking from kernel space will result
484 * in NO COPY ON WRITE (!!!), until an execve is executed. This
485 * is no problem, but for the stack. This is handled by not letting
486 * main() use the stack at all after fork(). Thus, no function
487 * calls - which means inline code for fork too, as otherwise we
488 * would use the stack upon exit from 'fork()'.
489 *
490 * Actually only pause and fork are needed inline, so that there
491 * won't be any messing with the stack from main(), but we define
492 * some others too.
493 */
494#define __NR__exit __NR_exit
495static __inline__ _syscall0(int,pause)
496static __inline__ _syscall0(int,sync)
497static __inline__ _syscall0(pid_t,setsid)
498static __inline__ _syscall3(int,write,int,fd,const char *,buf,off_t,count)
499static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count)
500static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
501static __inline__ _syscall1(int,dup,int,fd)
502static __inline__ _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
503static __inline__ _syscall3(int,open,const char *,file,int,flag,int,mode)
504static __inline__ _syscall1(int,close,int,fd)
505static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
506static __inline__ _syscall1(int,delete_module,const char *,name)
507
508static __inline__ pid_t wait(int * wait_stat)
509{
510 return waitpid(-1,wait_stat,0);
511}
512
513asmlinkage long sys_mmap2(
514 unsigned long addr, unsigned long len,
515 unsigned long prot, unsigned long flags,
516 unsigned long fd, unsigned long pgoff);
517asmlinkage int sys_execve(char *ufilename, char **uargv,
518 char **uenvp, unsigned long r7,
519 struct pt_regs regs);
520asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
521 unsigned long parent_tidptr,
522 unsigned long child_tidptr,
523 struct pt_regs regs);
524asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
525 unsigned long r6, unsigned long r7,
526 struct pt_regs regs);
527asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
528 unsigned long r6, unsigned long r7,
529 struct pt_regs regs);
530asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
531 unsigned long r6, unsigned long r7,
532 struct pt_regs regs);
533asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf,
534 size_t count, long dummy, loff_t pos);
535asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf,
536 size_t count, long dummy, loff_t pos);
537struct sigaction;
538asmlinkage long sys_rt_sigaction(int sig,
539 const struct sigaction __user *act,
540 struct sigaction __user *oact,
541 size_t sigsetsize);
542
543#endif /* __KERNEL_SYSCALLS__ */
544
545/* 475/*
546 * "Conditional" syscalls 476 * "Conditional" syscalls
547 * 477 *
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h
index c113566bef33..ee7828b27ad1 100644
--- a/include/asm-sh64/unistd.h
+++ b/include/asm-sh64/unistd.h
@@ -513,47 +513,6 @@ __syscall_return(type,__sc0); \
513#define __ARCH_WANT_SYS_SIGPROCMASK 513#define __ARCH_WANT_SYS_SIGPROCMASK
514#define __ARCH_WANT_SYS_RT_SIGACTION 514#define __ARCH_WANT_SYS_RT_SIGACTION
515 515
516#ifdef __KERNEL_SYSCALLS__
517
518/* Copy from sh */
519#include <linux/compiler.h>
520#include <linux/types.h>
521#include <asm/ptrace.h>
522
523/*
524 * we need this inline - forking from kernel space will result
525 * in NO COPY ON WRITE (!!!), until an execve is executed. This
526 * is no problem, but for the stack. This is handled by not letting
527 * main() use the stack at all after fork(). Thus, no function
528 * calls - which means inline code for fork too, as otherwise we
529 * would use the stack upon exit from 'fork()'.
530 *
531 * Actually only pause and fork are needed inline, so that there
532 * won't be any messing with the stack from main(), but we define
533 * some others too.
534 */
535#define __NR__exit __NR_exit
536static inline _syscall0(int,pause)
537static inline _syscall1(int,setup,int,magic)
538static inline _syscall0(int,sync)
539static inline _syscall0(pid_t,setsid)
540static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
541static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
542static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
543static inline _syscall1(int,dup,int,fd)
544static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
545static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
546static inline _syscall1(int,close,int,fd)
547static inline _syscall1(int,_exit,int,exitcode)
548static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
549static inline _syscall1(int,delete_module,const char *,name)
550
551static inline pid_t wait(int * wait_stat)
552{
553 return waitpid(-1,wait_stat,0);
554}
555#endif /* __KERNEL_SYSCALLS__ */
556
557/* 516/*
558 * "Conditional" syscalls 517 * "Conditional" syscalls
559 * 518 *
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 2553762465ca..c7a495afc82e 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -478,53 +478,6 @@ return -1; \
478#define __ARCH_WANT_SYS_SIGPROCMASK 478#define __ARCH_WANT_SYS_SIGPROCMASK
479#define __ARCH_WANT_SYS_RT_SIGSUSPEND 479#define __ARCH_WANT_SYS_RT_SIGSUSPEND
480 480
481#ifdef __KERNEL_SYSCALLS__
482
483#include <linux/compiler.h>
484#include <linux/types.h>
485
486/*
487 * we need this inline - forking from kernel space will result
488 * in NO COPY ON WRITE (!!!), until an execve is executed. This
489 * is no problem, but for the stack. This is handled by not letting
490 * main() use the stack at all after fork(). Thus, no function
491 * calls - which means inline code for fork too, as otherwise we
492 * would use the stack upon exit from 'fork()'.
493 *
494 * Actually only pause and fork are needed inline, so that there
495 * won't be any messing with the stack from main(), but we define
496 * some others too.
497 */
498#define __NR__exit __NR_exit
499static __inline__ _syscall0(pid_t,setsid)
500static __inline__ _syscall3(int,write,int,fd,__const__ char *,buf,off_t,count)
501static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count)
502static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
503static __inline__ _syscall1(int,dup,int,fd)
504static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp)
505static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode)
506static __inline__ _syscall1(int,close,int,fd)
507static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
508
509#include <linux/linkage.h>
510
511asmlinkage unsigned long sys_mmap(
512 unsigned long addr, unsigned long len,
513 unsigned long prot, unsigned long flags,
514 unsigned long fd, unsigned long off);
515asmlinkage unsigned long sys_mmap2(
516 unsigned long addr, unsigned long len,
517 unsigned long prot, unsigned long flags,
518 unsigned long fd, unsigned long pgoff);
519struct sigaction;
520asmlinkage long sys_rt_sigaction(int sig,
521 const struct sigaction __user *act,
522 struct sigaction __user *oact,
523 void __user *restorer,
524 size_t sigsetsize);
525
526#endif /* __KERNEL_SYSCALLS__ */
527
528/* 481/*
529 * "Conditional" syscalls 482 * "Conditional" syscalls
530 * 483 *
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index badc73fdcb97..124cf076717f 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -445,48 +445,6 @@ if (__res>=0) \
445errno = -__res; \ 445errno = -__res; \
446return -1; \ 446return -1; \
447} 447}
448#ifdef __KERNEL_SYSCALLS__
449
450#include <linux/compiler.h>
451#include <linux/types.h>
452
453/*
454 * we need this inline - forking from kernel space will result
455 * in NO COPY ON WRITE (!!!), until an execve is executed. This
456 * is no problem, but for the stack. This is handled by not letting
457 * main() use the stack at all after fork(). Thus, no function
458 * calls - which means inline code for fork too, as otherwise we
459 * would use the stack upon exit from 'fork()'.
460 *
461 * Actually only pause and fork are needed inline, so that there
462 * won't be any messing with the stack from main(), but we define
463 * some others too.
464 */
465#define __NR__exit __NR_exit
466static __inline__ _syscall0(pid_t,setsid)
467static __inline__ _syscall3(int,write,int,fd,__const__ char *,buf,off_t,count)
468static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count)
469static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
470static __inline__ _syscall1(int,dup,int,fd)
471static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp)
472static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode)
473static __inline__ _syscall1(int,close,int,fd)
474static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
475
476#include <linux/linkage.h>
477
478asmlinkage unsigned long sys_mmap(
479 unsigned long addr, unsigned long len,
480 unsigned long prot, unsigned long flags,
481 unsigned long fd, unsigned long off);
482struct sigaction;
483asmlinkage long sys_rt_sigaction(int sig,
484 const struct sigaction __user *act,
485 struct sigaction __user *oact,
486 void __user *restorer,
487 size_t sigsetsize);
488
489#endif /* __KERNEL_SYSCALLS__ */
490 448
491/* sysconf options, for SunOS compatibility */ 449/* sysconf options, for SunOS compatibility */
492#define _SC_ARG_MAX 1 450#define _SC_ARG_MAX 1
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h
index 552b7c873a57..737401e7d3ad 100644
--- a/include/asm-v850/unistd.h
+++ b/include/asm-v850/unistd.h
@@ -387,57 +387,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
387#define __ARCH_WANT_SYS_SIGPROCMASK 387#define __ARCH_WANT_SYS_SIGPROCMASK
388#define __ARCH_WANT_SYS_RT_SIGACTION 388#define __ARCH_WANT_SYS_RT_SIGACTION
389 389
390#ifdef __KERNEL_SYSCALLS__
391
392#include <linux/compiler.h>
393#include <linux/types.h>
394
395/*
396 * we need this inline - forking from kernel space will result
397 * in NO COPY ON WRITE (!!!), until an execve is executed. This
398 * is no problem, but for the stack. This is handled by not letting
399 * main() use the stack at all after fork(). Thus, no function
400 * calls - which means inline code for fork too, as otherwise we
401 * would use the stack upon exit from 'fork()'.
402 *
403 * Actually only pause and fork are needed inline, so that there
404 * won't be any messing with the stack from main(), but we define
405 * some others too.
406 */
407#define __NR__exit __NR_exit
408extern inline _syscall0(pid_t,setsid)
409extern inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
410extern inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
411extern inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
412extern inline _syscall1(int,dup,int,fd)
413extern inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
414extern inline _syscall3(int,open,const char *,file,int,flag,int,mode)
415extern inline _syscall1(int,close,int,fd)
416extern inline _syscall1(int,_exit,int,exitcode)
417extern inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
418
419extern inline pid_t wait(int * wait_stat)
420{
421 return waitpid (-1, wait_stat, 0);
422}
423
424unsigned long sys_mmap(unsigned long addr, size_t len,
425 unsigned long prot, unsigned long flags,
426 unsigned long fd, off_t offset);
427unsigned long sys_mmap2(unsigned long addr, size_t len,
428 unsigned long prot, unsigned long flags,
429 unsigned long fd, unsigned long pgoff);
430struct pt_regs;
431int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs);
432int sys_pipe (int *fildes);
433struct sigaction;
434asmlinkage long sys_rt_sigaction(int sig,
435 const struct sigaction __user *act,
436 struct sigaction __user *oact,
437 size_t sigsetsize);
438
439#endif /* __KERNEL_SYSCALLS__ */
440
441/* 390/*
442 * "Conditional" syscalls 391 * "Conditional" syscalls
443 */ 392 */
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h
index 5e1b99dc4ab3..411f810a55c6 100644
--- a/include/asm-xtensa/unistd.h
+++ b/include/asm-xtensa/unistd.h
@@ -402,11 +402,6 @@ __asm__ __volatile__ ( \
402__syscall_return(type,__res); \ 402__syscall_return(type,__res); \
403} 403}
404 404
405
406#ifdef __KERNEL_SYSCALLS__
407static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp)
408#endif
409
410/* 405/*
411 * "Conditional" syscalls 406 * "Conditional" syscalls
412 * 407 *
diff --git a/include/linux/unistd.h b/include/linux/unistd.h
index c18c60f3254e..aa8d5b5e2e3e 100644
--- a/include/linux/unistd.h
+++ b/include/linux/unistd.h
@@ -1,12 +1,8 @@
1#ifndef _LINUX_UNISTD_H_ 1#ifndef _LINUX_UNISTD_H_
2#define _LINUX_UNISTD_H_ 2#define _LINUX_UNISTD_H_
3 3
4#ifdef __KERNEL__
5extern int errno;
6#endif
7
8/* 4/*
9 * Include machine specific syscallX macros 5 * Include machine specific syscall numbers
10 */ 6 */
11#include <asm/unistd.h> 7#include <asm/unistd.h>
12 8