aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-26 23:08:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-28 22:14:55 -0500
commit0bcfe5404962cfb1dd0d4b3755357c12a98ef3d1 (patch)
tree6dd8eb8df0feba00f24b0834d4bbd63d5f825fa7 /arch
parent38a61b6b4a45ec8c82c75403848e1c579113c3c5 (diff)
powerpc: switch to generic fork/clone/vfork
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/powerpc/include/asm/syscalls.h9
-rw-r--r--arch/powerpc/include/asm/unistd.h3
-rw-r--r--arch/powerpc/kernel/process.c23
4 files changed, 4 insertions, 32 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5af5aa707176..951a517a1a0f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -145,6 +145,7 @@ config PPC
145 select HAVE_MOD_ARCH_SPECIFIC 145 select HAVE_MOD_ARCH_SPECIFIC
146 select MODULES_USE_ELF_RELA 146 select MODULES_USE_ELF_RELA
147 select GENERIC_KERNEL_EXECVE 147 select GENERIC_KERNEL_EXECVE
148 select CLONE_BACKWARDS
148 149
149config EARLY_PRINTK 150config EARLY_PRINTK
150 bool 151 bool
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h
index 329db4ec12ca..b5308d3e6d39 100644
--- a/arch/powerpc/include/asm/syscalls.h
+++ b/arch/powerpc/include/asm/syscalls.h
@@ -17,15 +17,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
17asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len, 17asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len,
18 unsigned long prot, unsigned long flags, 18 unsigned long prot, unsigned long flags,
19 unsigned long fd, unsigned long pgoff); 19 unsigned long fd, unsigned long pgoff);
20asmlinkage int sys_clone(unsigned long clone_flags, unsigned long usp,
21 int __user *parent_tidp, void __user *child_threadptr,
22 int __user *child_tidp, int p6, struct pt_regs *regs);
23asmlinkage int sys_fork(unsigned long p1, unsigned long p2,
24 unsigned long p3, unsigned long p4, unsigned long p5,
25 unsigned long p6, struct pt_regs *regs);
26asmlinkage int sys_vfork(unsigned long p1, unsigned long p2,
27 unsigned long p3, unsigned long p4, unsigned long p5,
28 unsigned long p6, struct pt_regs *regs);
29asmlinkage long sys_pipe(int __user *fildes); 20asmlinkage long sys_pipe(int __user *fildes);
30asmlinkage long sys_pipe2(int __user *fildes, int flags); 21asmlinkage long sys_pipe2(int __user *fildes, int flags);
31asmlinkage long sys_rt_sigaction(int sig, 22asmlinkage long sys_rt_sigaction(int sig,
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index 280068cfff2e..76fe846ec40e 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -56,6 +56,9 @@
56#define __ARCH_WANT_COMPAT_SYS_SENDFILE 56#define __ARCH_WANT_COMPAT_SYS_SENDFILE
57#endif 57#endif
58#define __ARCH_WANT_SYS_EXECVE 58#define __ARCH_WANT_SYS_EXECVE
59#define __ARCH_WANT_SYS_FORK
60#define __ARCH_WANT_SYS_VFORK
61#define __ARCH_WANT_SYS_CLONE
59 62
60/* 63/*
61 * "Conditional" syscalls 64 * "Conditional" syscalls
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index f6d244db9203..a31437567631 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1026,29 +1026,6 @@ int get_unalign_ctl(struct task_struct *tsk, unsigned long adr)
1026 return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr); 1026 return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr);
1027} 1027}
1028 1028
1029int sys_clone(unsigned long clone_flags, unsigned long usp,
1030 int __user *parent_tidp, void __user *child_threadptr,
1031 int __user *child_tidp, int p6,
1032 struct pt_regs *regs)
1033{
1034 return do_fork(clone_flags, usp, regs, 0, parent_tidp, child_tidp);
1035}
1036
1037int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
1038 unsigned long p4, unsigned long p5, unsigned long p6,
1039 struct pt_regs *regs)
1040{
1041 return do_fork(SIGCHLD, 0, regs, 0, NULL, NULL);
1042}
1043
1044int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
1045 unsigned long p4, unsigned long p5, unsigned long p6,
1046 struct pt_regs *regs)
1047{
1048 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0,
1049 regs, 0, NULL, NULL);
1050}
1051
1052static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, 1029static inline int valid_irq_stack(unsigned long sp, struct task_struct *p,
1053 unsigned long nbytes) 1030 unsigned long nbytes)
1054{ 1031{