aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index a83727b308a0..8a1b001d0b11 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -83,7 +83,7 @@ void flush_fp_to_thread(struct task_struct *tsk)
83 */ 83 */
84 BUG_ON(tsk != current); 84 BUG_ON(tsk != current);
85#endif 85#endif
86 giveup_fpu(current); 86 giveup_fpu(tsk);
87 } 87 }
88 preempt_enable(); 88 preempt_enable();
89 } 89 }
@@ -143,7 +143,7 @@ void flush_altivec_to_thread(struct task_struct *tsk)
143#ifdef CONFIG_SMP 143#ifdef CONFIG_SMP
144 BUG_ON(tsk != current); 144 BUG_ON(tsk != current);
145#endif 145#endif
146 giveup_altivec(current); 146 giveup_altivec(tsk);
147 } 147 }
148 preempt_enable(); 148 preempt_enable();
149 } 149 }
@@ -182,7 +182,7 @@ void flush_spe_to_thread(struct task_struct *tsk)
182#ifdef CONFIG_SMP 182#ifdef CONFIG_SMP
183 BUG_ON(tsk != current); 183 BUG_ON(tsk != current);
184#endif 184#endif
185 giveup_spe(current); 185 giveup_spe(tsk);
186 } 186 }
187 preempt_enable(); 187 preempt_enable();
188 } 188 }
@@ -605,6 +605,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
605 regs->ccr = 0; 605 regs->ccr = 0;
606 regs->gpr[1] = sp; 606 regs->gpr[1] = sp;
607 607
608 /*
609 * We have just cleared all the nonvolatile GPRs, so make
610 * FULL_REGS(regs) return true. This is necessary to allow
611 * ptrace to examine the thread immediately after exec.
612 */
613 regs->trap &= ~1UL;
614
608#ifdef CONFIG_PPC32 615#ifdef CONFIG_PPC32
609 regs->mq = 0; 616 regs->mq = 0;
610 regs->nip = start; 617 regs->nip = start;