summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-03-10 05:55:26 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-03-10 05:55:26 +0000
commit651e183fe9a0b9c8326b97c4842117fcb46fa3a3 (patch)
tree38efbec2b5111d3223c2f551612c2ca614e5d0db
parentb36ad9d674666da7a53c97c34170d0c66950733a (diff)
downloadFreeBSD-src-651e183fe9a0b9c8326b97c4842117fcb46fa3a3.zip
FreeBSD-src-651e183fe9a0b9c8326b97c4842117fcb46fa3a3.tar.gz
It is not necessary to read %gs twice.
-rw-r--r--sys/i386/i386/vm_machdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index a2470de..b9161eb 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -172,9 +172,9 @@ cpu_fork(td1, p2, td2, flags)
}
/* Ensure that p1's pcb is up to date. */
-#ifdef DEV_NPX
if (td1 == curthread)
td1->td_pcb->pcb_gs = rgs();
+#ifdef DEV_NPX
savecrit = intr_disable();
if (PCPU_GET(fpcurthread) == td1)
npxsave(&td1->td_pcb->pcb_save);
@@ -233,7 +233,6 @@ cpu_fork(td1, p2, td2, flags)
pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
pcb2->pcb_eip = (int)fork_trampoline;
pcb2->pcb_psl = PSL_KERNEL; /* ints disabled */
- pcb2->pcb_gs = rgs();
/*-
* pcb2->pcb_dr*: cloned above.
* pcb2->pcb_savefpu: cloned above.
OpenPOWER on IntegriCloud