mips: take the "zero newsp means inherit the parent's one" to copy_thread()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 498a7ec..9df3e33 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -289,8 +289,6 @@
 
 	clone_flags = regs.regs[4];
 	newsp = regs.regs[5];
-	if (!newsp)
-		newsp = regs.regs[29];
 	parent_tidptr = (int __user *) regs.regs[6];
 
 	/* Use __dummy4 instead of getting it off the stack, so that
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index a11c6f9..a33d2ef8 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -156,7 +156,8 @@
 	*childregs = *regs;
 	childregs->regs[7] = 0;	/* Clear error flag */
 	childregs->regs[2] = 0;	/* Child gets zero as return value */
-	childregs->regs[29] = usp;
+	if (usp)
+		childregs->regs[29] = usp;
 	ti->addr_limit = USER_DS;
 
 	p->thread.reg29 = (unsigned long) childregs;
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 7e1c70d..28daa66 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -86,7 +86,7 @@
 static int __used noinline
 _sys_fork(nabi_no_regargs struct pt_regs regs)
 {
-	return do_fork(SIGCHLD, regs.regs[29], 0, NULL, NULL);
+	return do_fork(SIGCHLD, 0, 0, NULL, NULL);
 }
 
 save_static_function(sys_clone);
@@ -99,8 +99,6 @@
 
 	clone_flags = regs.regs[4];
 	newsp = regs.regs[5];
-	if (!newsp)
-		newsp = regs.regs[29];
 	parent_tidptr = (int __user *) regs.regs[6];
 #ifdef CONFIG_32BIT
 	/* We need to fetch the fifth argument off the stack.  */