diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-27 04:03:41 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-29 03:43:40 (GMT) |
commit | f3268edbe6fe0ce56e62c6d6b14640aeb04864b7 (patch) | |
tree | 1ff80222598a1f259ab1910affe0740478090369 /arch/microblaze/kernel/process.c | |
parent | f01aceac61ad5cc9ea463f6bb185c1f72702357f (diff) | |
download | linux-fsl-qoriq-f3268edbe6fe0ce56e62c6d6b14640aeb04864b7.tar.xz |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 29768c3..a5fed8d 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; |