take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
now it can be done...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/arch/arm64/include/asm/syscalls.h b/arch/arm64/include/asm/syscalls.h
index 010ec12..20d63b2 100644
--- a/arch/arm64/include/asm/syscalls.h
+++ b/arch/arm64/include/asm/syscalls.h
@@ -27,14 +27,6 @@
asmlinkage long sys_sigaltstack_wrapper(const stack_t __user *uss,
stack_t __user *uoss);
-/*
- * AArch64 sys_clone implementation has a different prototype than the generic
- * one (additional TLS value argument).
- */
-asmlinkage long sys_clone(unsigned long, unsigned long, void __user *, int,
- void __user *);
-#define sys_clone sys_clone
-
#include <asm-generic/syscalls.h>
#endif /* __ASM_SYSCALLS_H */
diff --git a/arch/hexagon/include/asm/syscall.h b/arch/hexagon/include/asm/syscall.h
index ec2ce67..4af9c7b 100644
--- a/arch/hexagon/include/asm/syscall.h
+++ b/arch/hexagon/include/asm/syscall.h
@@ -25,11 +25,6 @@
unsigned long, unsigned long,
unsigned long, unsigned long);
-asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
- unsigned long parent_tidp, unsigned long child_tidp);
-
-#define sys_clone sys_clone
-
#include <asm-generic/syscalls.h>
extern void *sys_call_table[];
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild
index 8653072..88a758a 100644
--- a/arch/microblaze/include/asm/Kbuild
+++ b/arch/microblaze/include/asm/Kbuild
@@ -3,3 +3,4 @@
header-y += elf.h
generic-y += clkdev.h
generic-y += exec.h
+generic-y += syscalls.h
diff --git a/arch/microblaze/include/asm/syscalls.h b/arch/microblaze/include/asm/syscalls.h
deleted file mode 100644
index 27f2f4c..0000000
--- a/arch/microblaze/include/asm/syscalls.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __ASM_MICROBLAZE_SYSCALLS_H
-
-asmlinkage long microblaze_vfork(struct pt_regs *regs);
-asmlinkage long microblaze_clone(int flags, unsigned long stack,
- struct pt_regs *regs);
-asmlinkage long microblaze_execve(const char __user *filenamei,
- const char __user *const __user *argv,
- const char __user *const __user *envp,
- struct pt_regs *regs);
-
-asmlinkage long sys_clone(int flags, unsigned long stack, struct pt_regs *regs);
-#define sys_clone sys_clone
-
-#include <asm-generic/syscalls.h>
-
-#endif /* __ASM_MICROBLAZE_SYSCALLS_H */
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index d0d3f69..d8251b9 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -54,10 +54,6 @@
long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args);
long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high,
u32 len_low);
-long sys_fork(void);
-long sys_clone(unsigned long newsp, unsigned long clone_flags,
- int __user *parent_tidptr, int __user *child_tidptr);
-long sys_vfork(void);
long sys_sigsuspend(int history0, int history1, old_sigset_t mask);
long sys_sigaction(int sig, const struct old_sigaction __user *act,
struct old_sigaction __user *oact);
diff --git a/arch/tile/include/asm/syscalls.h b/arch/tile/include/asm/syscalls.h
index 394c76f..4c8462a 100644
--- a/arch/tile/include/asm/syscalls.h
+++ b/arch/tile/include/asm/syscalls.h
@@ -63,11 +63,8 @@
#endif
/* Provide versions of standard syscalls that use current_pt_regs(). */
-long sys_clone(unsigned long clone_flags, unsigned long newsp,
- void __user *parent_tid, void __user *child_tid);
long sys_rt_sigreturn(void);
long sys_sigaltstack(const stack_t __user *, stack_t __user *);
-#define sys_clone sys_clone
#define sys_rt_sigreturn sys_rt_sigreturn
#define sys_sigaltstack sys_sigaltstack
diff --git a/arch/tile/kernel/compat.c b/arch/tile/kernel/compat.c
index a2e8055..9cd7cb6 100644
--- a/arch/tile/kernel/compat.c
+++ b/arch/tile/kernel/compat.c
@@ -104,7 +104,6 @@
/* Call the assembly trampolines where necessary. */
#define compat_sys_rt_sigreturn _compat_sys_rt_sigreturn
-#undef sys_clone
#define sys_clone _sys_clone
/*
diff --git a/arch/tile/kernel/sys.c b/arch/tile/kernel/sys.c
index 02ff5c0..b881a7be 100644
--- a/arch/tile/kernel/sys.c
+++ b/arch/tile/kernel/sys.c
@@ -109,7 +109,6 @@
/* Call the assembly trampolines where necessary. */
#undef sys_rt_sigreturn
#define sys_rt_sigreturn _sys_rt_sigreturn
-#undef sys_clone
#define sys_clone _sys_clone
/*
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index f7252d1..2f83747 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -20,17 +20,6 @@
asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
long sys_iopl(unsigned int, struct pt_regs *);
-/* kernel/process.c */
-asmlinkage long sys_fork(void);
-asmlinkage long sys_vfork(void);
-#ifdef CONFIG_CLONE_BACKWARDS
-asmlinkage long sys_clone(unsigned long, unsigned long, void __user *, int,
- void __user *);
-#else
-asmlinkage long sys_clone(unsigned long, unsigned long, void __user *,
- void __user *, int);
-#endif
-
/* kernel/ldt.c */
asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
diff --git a/arch/x86/um/shared/sysdep/syscalls.h b/arch/x86/um/shared/sysdep/syscalls.h
index ca255a8..bd9a89b 100644
--- a/arch/x86/um/shared/sysdep/syscalls.h
+++ b/arch/x86/um/shared/sysdep/syscalls.h
@@ -1,5 +1,3 @@
-extern long sys_clone(unsigned long clone_flags, unsigned long newsp,
- void __user *parent_tid, void __user *child_tid);
#ifdef __i386__
#include "syscalls_32.h"
#else
diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h
index 7796033..58f466f 100644
--- a/include/asm-generic/syscalls.h
+++ b/include/asm-generic/syscalls.h
@@ -8,18 +8,6 @@
* Calling conventions for these system calls can differ, so
* it's possible to override them.
*/
-#ifndef sys_clone
-asmlinkage long sys_clone(unsigned long clone_flags, unsigned long newsp,
- void __user *parent_tid, void __user *child_tid);
-#endif
-
-#ifndef sys_fork
-asmlinkage long sys_fork(void);
-#endif
-
-#ifndef sys_vfork
-asmlinkage long sys_vfork(void);
-#endif
#ifndef sys_mmap2
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 526deb3..91835e7 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -836,6 +836,16 @@
(const char __user *const __user *)envp)
#endif
+asmlinkage long sys_fork(void);
+asmlinkage long sys_vfork(void);
+#ifdef CONFIG_CLONE_BACKWARDS
+asmlinkage long sys_clone(unsigned long, unsigned long, int __user *, int,
+ int __user *);
+#else
+asmlinkage long sys_clone(unsigned long, unsigned long, int __user *,
+ int __user *, int);
+#endif
+
asmlinkage long sys_execve(const char __user *filename,
const char __user *const __user *argv,
const char __user *const __user *envp);