aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/process.c
diff options
context:
space:
mode:
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 @@
13#include <linux/pm.h> 13#include <linux/pm.h>
14#include <linux/tick.h> 14#include <linux/tick.h>
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16#include <linux/ptrace.h>
16#include <asm/pgalloc.h> 17#include <asm/pgalloc.h>
17#include <asm/uaccess.h> /* for USER_DS macros */ 18#include <asm/uaccess.h> /* for USER_DS macros */
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
@@ -120,7 +121,7 @@ void flush_thread(void)
120 121
121int copy_thread(unsigned long clone_flags, unsigned long usp, 122int copy_thread(unsigned long clone_flags, unsigned long usp,
122 unsigned long arg, 123 unsigned long arg,
123 struct task_struct *p, struct pt_regs *regs) 124 struct task_struct *p, struct pt_regs *unused)
124{ 125{
125 struct pt_regs *childregs = task_pt_regs(p); 126 struct pt_regs *childregs = task_pt_regs(p);
126 struct thread_info *ti = task_thread_info(p); 127 struct thread_info *ti = task_thread_info(p);
@@ -141,8 +142,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
141 ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8; 142 ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8;
142 return 0; 143 return 0;
143 } 144 }
144 *childregs = *regs; 145 *childregs = *current_pt_regs();
145 childregs->r1 = usp; 146 if (usp)
147 childregs->r1 = usp;
146 148
147 memset(&ti->cpu_context, 0, sizeof(struct cpu_context)); 149 memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
148 ti->cpu_context.r1 = (unsigned long)childregs; 150 ti->cpu_context.r1 = (unsigned long)childregs;