summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-04-21 04:39:36 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-04-21 04:39:36 +0000
commit69e87fee98396ec10e442c4defdf192d9e53f997 (patch)
treec48c59ddc701b5f8aee3c870708fb4c8b5fd7659 /sys/arch/amd64
parent15c9f1f18f2762ddbd2ccdb7ffe0f7d14309de8e (diff)
count fpu lazy context switches; deraadt@ ok
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/fpu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/fpu.c b/sys/arch/amd64/amd64/fpu.c
index 820fb7a8305..93962c0cd17 100644
--- a/sys/arch/amd64/amd64/fpu.c
+++ b/sys/arch/amd64/amd64/fpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu.c,v 1.7 2004/10/28 20:36:15 kettenis Exp $ */
+/* $OpenBSD: fpu.c,v 1.8 2005/04/21 04:39:34 mickey Exp $ */
/* $NetBSD: fpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*-
@@ -207,9 +207,10 @@ fpudna(struct cpu_info *ci)
* Initialize the FPU state to clear any exceptions. If someone else
* was using the FPU, save their state.
*/
- if (ci->ci_fpcurproc != NULL && ci->ci_fpcurproc != p)
+ if (ci->ci_fpcurproc != NULL && ci->ci_fpcurproc != p) {
fpusave_cpu(ci, 1);
- else {
+ uvmexp.fpswtch++;
+ } else {
clts();
fninit();
fwait();