Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Actually, don't do anything if we switch to...
details: https://anonhg.NetBSD.org/src/rev/57eeaece200f
branches: trunk
changeset: 319939:57eeaece200f
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Jun 16 05:52:17 2018 +0000
description:
Actually, don't do anything if we switch to a kernel thread. When the cpu
switches back to a user thread the fpu is restored, so no point calling
fninit (which doesn't clear all the states anyway).
diffstat:
sys/arch/x86/x86/fpu.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
diffs (44 lines):
diff -r edb9f7e5d2c6 -r 57eeaece200f sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c Sat Jun 16 01:25:23 2018 +0000
+++ b/sys/arch/x86/x86/fpu.c Sat Jun 16 05:52:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.34 2018/06/14 18:00:15 maxv Exp $ */
+/* $NetBSD: fpu.c,v 1.35 2018/06/16 05:52:17 maxv Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc. All
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.34 2018/06/14 18:00:15 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.35 2018/06/16 05:52:17 maxv Exp $");
#include "opt_multiprocessor.h"
@@ -333,14 +333,6 @@
}
static void
-fpu_reset(void)
-{
- clts();
- fninit();
- stts();
-}
-
-static void
fpu_eagerrestore(struct lwp *l)
{
struct pcb *pcb = lwp_getpcb(l);
@@ -359,9 +351,7 @@
s = splhigh();
fpusave_cpu(true);
- if (newlwp->l_flag & LW_SYSTEM)
- fpu_reset();
- else
+ if (!(newlwp->l_flag & LW_SYSTEM))
fpu_eagerrestore(newlwp);
splx(s);
}
Home |
Main Index |
Thread Index |
Old Index