Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178224070
D62035.1796280350.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D62035.1796280350.diff
View Options
diff --git a/sys/powerpc/powerpc/ptrace_machdep.c b/sys/powerpc/powerpc/ptrace_machdep.c
--- a/sys/powerpc/powerpc/ptrace_machdep.c
+++ b/sys/powerpc/powerpc/ptrace_machdep.c
@@ -60,10 +60,8 @@
if (!(cpu_features & PPC_FEATURE_VECTOR))
break;
- if (pcb->pcb_flags & PCB_VEC) {
- save_vec_nodrop(td);
+ if (pcb->pcb_flags & PCB_VECREGS)
memcpy(&vec, &pcb->pcb_vec, sizeof(vec));
- }
error = copyout(&vec, addr, sizeof(vec));
break;
case PT_SETVRREGS:
@@ -71,7 +69,13 @@
break;
error = copyin(addr, &vec, sizeof(vec));
if (error == 0) {
- pcb->pcb_flags |= PCB_VEC;
+ /*
+ * The thread is stopped, so the PCB is authoritative.
+ * Mark the registers valid; ownership (PCB_VEC) is
+ * only ever granted by the unavailable trap or by
+ * cpu_switchin(), and the trap asserts it is clear.
+ */
+ pcb->pcb_flags |= PCB_VECREGS;
memcpy(&pcb->pcb_vec, &vec, sizeof(vec));
}
break;
@@ -79,9 +83,7 @@
if (!(cpu_features & PPC_FEATURE_HAS_VSX))
break;
- if (pcb->pcb_flags & PCB_VSX) {
- save_fpu_nodrop(td);
-
+ if (pcb->pcb_flags & PCB_FPREGS) {
/*
* Doubleword 0 of VSR0-VSR31 overlap with FPR0-FPR31 and
* VSR32-VSR63 overlap with VR0-VR31, so we only copy
@@ -99,7 +101,7 @@
break;
error = copyin(addr, &vsr, sizeof(vsr));
if (error == 0) {
- pcb->pcb_flags |= PCB_VSX;
+ pcb->pcb_flags |= PCB_FPREGS;
/*
* Doubleword 0 of VSR0-VSR31 overlap with FPR0-FPR31 and
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 3, 6:45 AM (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42007849
Default Alt Text
D62035.1796280350.diff (1 KB)
Attached To
Mode
D62035: powerpc: use the register validity flags in the vector ptrace requests
Attached
Detach File
Event Timeline