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 Remove a wrong comment - the FPU save size ...



details:   https://anonhg.NetBSD.org/src/rev/6487bf1178df
branches:  trunk
changeset: 819794:6487bf1178df
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Dec 17 15:23:08 2016 +0000

description:
Remove a wrong comment - the FPU save size should never be percpu -, and
be more explicit about Xen.

diffstat:

 sys/arch/x86/x86/identcpu.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r c4851e5531ed -r 6487bf1178df sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Sat Dec 17 15:18:28 2016 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Sat Dec 17 15:23:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: identcpu.c,v 1.50 2016/01/01 19:46:48 tls Exp $        */
+/*     $NetBSD: identcpu.c,v 1.51 2016/12/17 15:23:08 maxv Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.50 2016/01/01 19:46:48 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.51 2016/12/17 15:23:08 maxv Exp $");
 
 #include "opt_xen.h"
 
@@ -760,10 +760,12 @@
 
        /* Get features and maximum size of the save area */
        x86_cpuid(0xd, descs);
-       /* XXX these probably ought to be per-cpu */
        if (descs[2] > 512)
-           x86_fpu_save_size = descs[2];
-#ifndef XEN
+               x86_fpu_save_size = descs[2];
+
+#ifdef XEN
+       /* Don't use xsave, force fxsave with x86_xsave_features = 0. */
+#else
        x86_xsave_features = (uint64_t)descs[3] << 32 | descs[0];
 #endif
 }



Home | Main Index | Thread Index | Old Index