aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/process.c')
-rw-r--r--arch/blackfin/kernel/process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index e5ae8fcab438..582276efaaa4 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -141,14 +141,14 @@ asmlinkage int bfin_clone(unsigned long clone_flags, unsigned long newsp)
141int 141int
142copy_thread(unsigned long clone_flags, 142copy_thread(unsigned long clone_flags,
143 unsigned long usp, unsigned long topstk, 143 unsigned long usp, unsigned long topstk,
144 struct task_struct *p, struct pt_regs *regs) 144 struct task_struct *p)
145{ 145{
146 struct pt_regs *childregs; 146 struct pt_regs *childregs;
147 unsigned long *v; 147 unsigned long *v;
148 148
149 childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1; 149 childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
150 v = ((unsigned long *)childregs) - 2; 150 v = ((unsigned long *)childregs) - 2;
151 if (unlikely(!regs)) { 151 if (unlikely(p->flags & PF_KTHREAD)) {
152 memset(childregs, 0, sizeof(struct pt_regs)); 152 memset(childregs, 0, sizeof(struct pt_regs));
153 v[0] = usp; 153 v[0] = usp;
154 v[1] = topstk; 154 v[1] = topstk;
@@ -157,7 +157,7 @@ copy_thread(unsigned long clone_flags,
157 __asm__ __volatile__("%0 = syscfg;":"=da"(childregs->syscfg):); 157 __asm__ __volatile__("%0 = syscfg;":"=da"(childregs->syscfg):);
158 p->thread.usp = 0; 158 p->thread.usp = 0;
159 } else { 159 } else {
160 *childregs = *regs; 160 *childregs = *current_pt_regs();
161 childregs->r0 = 0; 161 childregs->r0 = 0;
162 p->thread.usp = usp ? : rdusp(); 162 p->thread.usp = usp ? : rdusp();
163 v[0] = v[1] = 0; 163 v[0] = v[1] = 0;