summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/syscall.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-27 12:11:46 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:33:02 -0500
commit50150d2bb9033de8a4d94b3feb2dfed81a605ed5 (patch)
tree038a165e4fd33f8f27713bb61a39d20da1c7b450 /arch/mips/kernel/syscall.c
parent64b3122df48b81a40366a11f299ab819138c96e8 (diff)
mips: switch to generic sys_fork() and sys_clone()
we still need the wrappers to store callee-saved registers in pt_regs, but once that done we can jump to kernel/fork.c variants. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/kernel/syscall.c')
-rw-r--r--arch/mips/kernel/syscall.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 28daa66baa7b..b32466a1a1d2 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -83,41 +83,7 @@ SYSCALL_DEFINE6(mips_mmap2, unsigned long, addr, unsigned long, len,
}
save_static_function(sys_fork);
-static int __used noinline
-_sys_fork(nabi_no_regargs struct pt_regs regs)
-{
- return do_fork(SIGCHLD, 0, 0, NULL, NULL);
-}
-
save_static_function(sys_clone);
-static int __used noinline
-_sys_clone(nabi_no_regargs struct pt_regs regs)
-{
- unsigned long clone_flags;
- unsigned long newsp;
- int __user *parent_tidptr, *child_tidptr;
-
- clone_flags = regs.regs[4];
- newsp = regs.regs[5];
- parent_tidptr = (int __user *) regs.regs[6];
-#ifdef CONFIG_32BIT
- /* We need to fetch the fifth argument off the stack. */
- child_tidptr = NULL;
- if (clone_flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) {
- int __user *__user *usp = (int __user *__user *) regs.regs[29];
- if (regs.regs[2] == __NR_syscall) {
- if (get_user (child_tidptr, &usp[5]))
- return -EFAULT;
- }
- else if (get_user (child_tidptr, &usp[4]))
- return -EFAULT;
- }
-#else
- child_tidptr = (int __user *) regs.regs[8];
-#endif
- return do_fork(clone_flags, newsp, 0,
- parent_tidptr, child_tidptr);
-}
SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
{