powerpc: switch to generic fork/clone/vfork
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 27 Oct 2012 03:08:25 +0000 (23:08 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 29 Nov 2012 03:14:55 +0000 (22:14 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/Kconfig
arch/powerpc/include/asm/syscalls.h
arch/powerpc/include/asm/unistd.h
arch/powerpc/kernel/process.c

index 5af5aa707176ff460b5185b080749ecb32392401..951a517a1a0fbedd3d9d1ca87bbcfab24986f9a1 100644 (file)
@@ -145,6 +145,7 @@ config PPC
        select HAVE_MOD_ARCH_SPECIFIC
        select MODULES_USE_ELF_RELA
        select GENERIC_KERNEL_EXECVE
+       select CLONE_BACKWARDS
 
 config EARLY_PRINTK
        bool
index 329db4ec12ca855f2180a8edfe5f535a201d0015..b5308d3e6d391fc36568f95e2a64aeec865e3a68 100644 (file)
@@ -17,15 +17,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
 asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len,
                unsigned long prot, unsigned long flags,
                unsigned long fd, unsigned long pgoff);
-asmlinkage int sys_clone(unsigned long clone_flags, unsigned long usp,
-               int __user *parent_tidp, void __user *child_threadptr,
-               int __user *child_tidp, int p6, struct pt_regs *regs);
-asmlinkage int sys_fork(unsigned long p1, unsigned long p2,
-               unsigned long p3, unsigned long p4, unsigned long p5,
-               unsigned long p6, struct pt_regs *regs);
-asmlinkage int sys_vfork(unsigned long p1, unsigned long p2,
-               unsigned long p3, unsigned long p4, unsigned long p5,
-               unsigned long p6, struct pt_regs *regs);
 asmlinkage long sys_pipe(int __user *fildes);
 asmlinkage long sys_pipe2(int __user *fildes, int flags);
 asmlinkage long sys_rt_sigaction(int sig,
index 280068cfff2e8721e39e4582277de4670bd09793..76fe846ec40e7fe771e70c25d0f01bbe75ea4789 100644 (file)
@@ -56,6 +56,9 @@
 #define __ARCH_WANT_COMPAT_SYS_SENDFILE
 #endif
 #define __ARCH_WANT_SYS_EXECVE
+#define __ARCH_WANT_SYS_FORK
+#define __ARCH_WANT_SYS_VFORK
+#define __ARCH_WANT_SYS_CLONE
 
 /*
  * "Conditional" syscalls
index f6d244db92030ba0e5938675ede2845e33b1f294..a31437567631a95ac2a8db5f5d4bffbd9bc265de 100644 (file)
@@ -1026,29 +1026,6 @@ int get_unalign_ctl(struct task_struct *tsk, unsigned long adr)
        return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr);
 }
 
-int sys_clone(unsigned long clone_flags, unsigned long usp,
-             int __user *parent_tidp, void __user *child_threadptr,
-             int __user *child_tidp, int p6,
-             struct pt_regs *regs)
-{
-       return do_fork(clone_flags, usp, regs, 0, parent_tidp, child_tidp);
-}
-
-int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
-            unsigned long p4, unsigned long p5, unsigned long p6,
-            struct pt_regs *regs)
-{
-       return do_fork(SIGCHLD, 0, regs, 0, NULL, NULL);
-}
-
-int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
-             unsigned long p4, unsigned long p5, unsigned long p6,
-             struct pt_regs *regs)
-{
-       return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
-                       regs, 0, NULL, NULL);
-}
-
 static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
                                  unsigned long nbytes)
 {