aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ptrace.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-09-13 02:44:20 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-09-14 09:53:30 -0400
commit5e14d21e3f28a4181dacff0336040e30942f4921 (patch)
treeebaa8217d5af80e15116960641a0bf87a8b5d717 /arch/powerpc/kernel/ptrace.c
parentd8f1324a5063c833862328ceafabc53ac3cc4f71 (diff)
[POWERPC] Add cpu feature for SPE handling
Make it so that SPE support can be determined at runtime. This is similiar to how we handle AltiVec. This allows us to have SPE support built in and work on processors with and without SPE. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r--arch/powerpc/kernel/ptrace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 8a177bd9eab4..fb8866e0e35d 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -576,8 +576,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
576#ifdef CONFIG_SPE 576#ifdef CONFIG_SPE
577 case PTRACE_GETEVRREGS: 577 case PTRACE_GETEVRREGS:
578 /* Get the child spe register state. */ 578 /* Get the child spe register state. */
579 if (child->thread.regs->msr & MSR_SPE) 579 flush_spe_to_thread(child);
580 giveup_spe(child);
581 ret = get_evrregs((unsigned long __user *)data, child); 580 ret = get_evrregs((unsigned long __user *)data, child);
582 break; 581 break;
583 582
@@ -585,8 +584,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
585 /* Set the child spe register state. */ 584 /* Set the child spe register state. */
586 /* this is to clear the MSR_SPE bit to force a reload 585 /* this is to clear the MSR_SPE bit to force a reload
587 * of register state from memory */ 586 * of register state from memory */
588 if (child->thread.regs->msr & MSR_SPE) 587 flush_spe_to_thread(child);
589 giveup_spe(child);
590 ret = set_evrregs(child, (unsigned long __user *)data); 588 ret = set_evrregs(child, (unsigned long __user *)data);
591 break; 589 break;
592#endif 590#endif