aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/ptrace.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-02-06 06:36:23 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-15 16:39:53 -0500
commitad187f956108e1c56b444706212bf08d84c0bee0 (patch)
tree5aa54adb07016a87be9629aea20a6fd363d449c2 /arch/arm/kernel/ptrace.c
parent54cb3dbb4a1cccd6b1bffc169ff638f8e74daf44 (diff)
ARM: vfp ptrace: no point flushing hw context for PTRACE_GETVFPREGS
If we're only reading the VFP context via the ptrace call, there's no need to invalidate the hardware context - we only need to do that on PTRACE_SETVFPREGS. This allows more efficient monitoring of a traced task. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/ptrace.c')
-rw-r--r--arch/arm/kernel/ptrace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index bdf002bab6a..08f899fb76a 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -700,7 +700,7 @@ static int ptrace_getvfpregs(struct task_struct *tsk, void __user *data)
700 union vfp_state *vfp = &thread->vfpstate; 700 union vfp_state *vfp = &thread->vfpstate;
701 struct user_vfp __user *ufp = data; 701 struct user_vfp __user *ufp = data;
702 702
703 vfp_sync_state(thread); 703 vfp_sync_hwstate(thread);
704 704
705 /* copy the floating point registers */ 705 /* copy the floating point registers */
706 if (copy_to_user(&ufp->fpregs, &vfp->hard.fpregs, 706 if (copy_to_user(&ufp->fpregs, &vfp->hard.fpregs,
@@ -723,7 +723,7 @@ static int ptrace_setvfpregs(struct task_struct *tsk, void __user *data)
723 union vfp_state *vfp = &thread->vfpstate; 723 union vfp_state *vfp = &thread->vfpstate;
724 struct user_vfp __user *ufp = data; 724 struct user_vfp __user *ufp = data;
725 725
726 vfp_sync_state(thread); 726 vfp_sync_hwstate(thread);
727 727
728 /* copy the floating point registers */ 728 /* copy the floating point registers */
729 if (copy_from_user(&vfp->hard.fpregs, &ufp->fpregs, 729 if (copy_from_user(&vfp->hard.fpregs, &ufp->fpregs,
@@ -734,6 +734,8 @@ static int ptrace_setvfpregs(struct task_struct *tsk, void __user *data)
734 if (get_user(vfp->hard.fpscr, &ufp->fpscr)) 734 if (get_user(vfp->hard.fpscr, &ufp->fpscr))
735 return -EFAULT; 735 return -EFAULT;
736 736
737 vfp_flush_hwstate(thread);
738
737 return 0; 739 return 0;
738} 740}
739#endif 741#endif