diff options
author | kib <kib@FreeBSD.org> | 2010-12-12 16:16:39 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-12-12 16:16:39 +0000 |
commit | bb485d7e110d4802393e7f10dc02b06606e61ad7 (patch) | |
tree | 8dd3f3212f7aad11833b6a27f196e3a96f661f84 /sys/i386 | |
parent | df80d2ec057cb6c459e80ab3fea64ca589a76c6e (diff) | |
download | FreeBSD-src-bb485d7e110d4802393e7f10dc02b06606e61ad7.zip FreeBSD-src-bb485d7e110d4802393e7f10dc02b06606e61ad7.tar.gz |
In fpudna()/npxdna(), mark FPU context initialized and optionally
mark user FPU context initialized, if current context is user context.
It was reversed in r215865, by inadequate change of this code fragment
to a call to fpuuserinited()/npxuserinited().
The issue is only relevant for in-kernel users of FPU.
Reported by: Jan Henrik Sylvester <me janh de>, Mike Tancsa <mike sentex net>
Tested by: Mike Tancsa
MFC after: 3 days
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/npx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 9ec5d25..f314e44 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -684,7 +684,9 @@ npxdna(void) fpurstor(&npx_initialstate); if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__) fldcw(pcb->pcb_initial_npxcw); - npxuserinited(curthread); + pcb->pcb_flags |= PCB_NPXINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_NPXUSERINITDONE; } else { /* * The following fpurstor() may cause an IRQ13 when the |