Module Name: src
Committed By: cherry
Date: Mon Mar 7 02:24:57 UTC 2011
Modified Files:
src/sys/arch/amd64/amd64: fpu.c
Log Message:
Use macros clts/stts instead of directly manipulating CR0 flags.
Expose fpuinit to XEN build. (remove #ifdef XEN)
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/amd64/fpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/fpu.c
diff -u src/sys/arch/amd64/amd64/fpu.c:1.33 src/sys/arch/amd64/amd64/fpu.c:1.34
--- src/sys/arch/amd64/amd64/fpu.c:1.33 Mon Dec 20 00:25:24 2010
+++ src/sys/arch/amd64/amd64/fpu.c Mon Mar 7 02:24:57 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.33 2010/12/20 00:25:24 matt Exp $ */
+/* $NetBSD: fpu.c,v 1.34 2011/03/07 02:24:57 cherry Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc. All
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.33 2010/12/20 00:25:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.34 2011/03/07 02:24:57 cherry Exp $");
#include "opt_multiprocessor.h"
@@ -155,18 +155,16 @@
void fpudna(struct cpu_info *);
static int x86fpflags_to_ksiginfo(uint32_t);
-#ifndef XEN
/*
* Init the FPU.
*/
void
fpuinit(struct cpu_info *ci)
{
- lcr0(rcr0() & ~(CR0_EM|CR0_TS));
+ clts();
fninit();
- lcr0(rcr0() | (CR0_TS));
+ stts();
}
-#endif
/*
* Record the FPU state and reinitialize it all except for the control word.