summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/process.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-27 06:03:41 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-29 04:43:40 +0100
commitf3268edbe6fe0ce56e62c6d6b14640aeb04864b7 (patch)
tree1ff80222598a1f259ab1910affe0740478090369 /arch/microblaze/kernel/process.c
parenthexagon: switch to generic clone() (diff)
downloadlinux-f3268edbe6fe0ce56e62c6d6b14640aeb04864b7.tar.xz
linux-f3268edbe6fe0ce56e62c6d6b14640aeb04864b7.zip
microblaze: switch to generic fork/vfork/clone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/kernel/process.c')
-rw-r--r--arch/microblaze/kernel/process.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 29768c3dc358..a5fed8db7263 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -13,6 +13,7 @@
#include <linux/pm.h>
#include <linux/tick.h>
#include <linux/bitops.h>
+#include <linux/ptrace.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h> /* for USER_DS macros */
#include <asm/cacheflush.h>
@@ -120,7 +121,7 @@ void flush_thread(void)
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
- struct task_struct *p, struct pt_regs *regs)
+ struct task_struct *p, struct pt_regs *unused)
{
struct pt_regs *childregs = task_pt_regs(p);
struct thread_info *ti = task_thread_info(p);
@@ -141,8 +142,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8;
return 0;
}
- *childregs = *regs;
- childregs->r1 = usp;
+ *childregs = *current_pt_regs();
+ if (usp)
+ childregs->r1 = usp;
memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
ti->cpu_context.r1 = (unsigned long)childregs;