Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 Use macros clts/stts instead of directl...
details: https://anonhg.NetBSD.org/src/rev/ae39535822b8
branches: trunk
changeset: 762982:ae39535822b8
user: cherry <cherry%NetBSD.org@localhost>
date: Mon Mar 07 02:24:57 2011 +0000
description:
Use macros clts/stts instead of directly manipulating CR0 flags.
Expose fpuinit to XEN build. (remove #ifdef XEN)
diffstat:
sys/arch/amd64/amd64/fpu.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 58eea0cce6b7 -r ae39535822b8 sys/arch/amd64/amd64/fpu.c
--- a/sys/arch/amd64/amd64/fpu.c Mon Mar 07 02:02:36 2011 +0000
+++ b/sys/arch/amd64/amd64/fpu.c Mon Mar 07 02:24:57 2011 +0000
@@ -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.
Home |
Main Index |
Thread Index |
Old Index