Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160771555
D12292.id33069.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12292.id33069.diff
View Options
Index: head/sys/arm/arm/machdep.c
===================================================================
--- head/sys/arm/arm/machdep.c
+++ head/sys/arm/arm/machdep.c
@@ -408,17 +408,18 @@
static void
get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp)
{
- struct pcb *curpcb;
+ struct pcb *pcb;
- curpcb = curthread->td_pcb;
- critical_enter();
-
- vfp_store(&curpcb->pcb_vfpstate, false);
- memcpy(vfp->mcv_reg, curpcb->pcb_vfpstate.reg,
+ pcb = td->td_pcb;
+ if (td == curthread) {
+ critical_enter();
+ vfp_store(&pcb->pcb_vfpstate, false);
+ critical_exit();
+ } else
+ MPASS(TD_IS_SUSPENDED(td));
+ memcpy(vfp->mcv_reg, pcb->pcb_vfpstate.reg,
sizeof(vfp->mcv_reg));
- vfp->mcv_fpscr = curpcb->pcb_vfpstate.fpscr;
-
- critical_exit();
+ vfp->mcv_fpscr = pcb->pcb_vfpstate.fpscr;
}
/*
@@ -427,17 +428,18 @@
static void
set_vfpcontext(struct thread *td, mcontext_vfp_t *vfp)
{
- struct pcb *curpcb;
+ struct pcb *pcb;
- curpcb = curthread->td_pcb;
- critical_enter();
-
- vfp_discard(td);
- memcpy(curpcb->pcb_vfpstate.reg, vfp->mcv_reg,
- sizeof(curpcb->pcb_vfpstate.reg));
- curpcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr;
-
- critical_exit();
+ pcb = td->td_pcb;
+ if (td == curthread) {
+ critical_enter();
+ vfp_discard(td);
+ critical_exit();
+ } else
+ MPASS(TD_IS_SUSPENDED(td));
+ memcpy(pcb->pcb_vfpstate.reg, vfp->mcv_reg,
+ sizeof(pcb->pcb_vfpstate.reg));
+ pcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr;
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 28, 4:20 PM (12 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34439107
Default Alt Text
D12292.id33069.diff (1 KB)
Attached To
Mode
D12292: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext.
Attached
Detach File
Event Timeline
Log In to Comment