Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86 Rename (the recently added) 'x86_xsave_size' to...
details: https://anonhg.NetBSD.org/src/rev/ec4e65baccaf
branches: trunk
changeset: 326960:ec4e65baccaf
user: dsl <dsl%NetBSD.org@localhost>
date: Sun Feb 23 22:38:40 2014 +0000
description:
Rename (the recently added) 'x86_xsave_size' to 'x86_fpu_save_size'
and default to 512 (the size of the fxsave structure).
diffstat:
sys/arch/x86/include/cpu.h | 4 ++--
sys/arch/x86/x86/identcpu.c | 9 +++++----
sys/arch/x86/x86/x86_machdep.c | 6 +++---
3 files changed, 10 insertions(+), 9 deletions(-)
diffs (82 lines):
diff -r 931886c8fac2 -r ec4e65baccaf sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Sun Feb 23 22:36:43 2014 +0000
+++ b/sys/arch/x86/include/cpu.h Sun Feb 23 22:38:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.65 2014/02/23 12:56:40 dsl Exp $ */
+/* $NetBSD: cpu.h,v 1.66 2014/02/23 22:38:40 dsl Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -387,7 +387,7 @@
#define FPU_SAVE_FXSAVE 1
#define FPU_SAVE_XSAVE 2
#define FPU_SAVE_XSAVEOPT 3
-extern unsigned int x86_xsave_size;
+extern unsigned int x86_fpu_save_size;
extern uint64_t x86_xsave_features;
extern void (*x86_cpu_idle)(void);
diff -r 931886c8fac2 -r ec4e65baccaf sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c Sun Feb 23 22:36:43 2014 +0000
+++ b/sys/arch/x86/x86/identcpu.c Sun Feb 23 22:38:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.41 2014/02/23 12:56:40 dsl Exp $ */
+/* $NetBSD: identcpu.c,v 1.42 2014/02/23 22:38:40 dsl 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.41 2014/02/23 12:56:40 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.42 2014/02/23 22:38:40 dsl Exp $");
#include "opt_xen.h"
@@ -61,7 +61,7 @@
char cpu_brand_string[49];
int x86_fpu_save = FPU_SAVE_FSAVE;
-unsigned int x86_xsave_size = 0;
+unsigned int x86_fpu_save_size = 512;
uint64_t x86_xsave_features = 0;
/*
@@ -756,7 +756,8 @@
/* Get features and maximum size of the save area */
x86_cpuid(0xd, descs);
/* XXX these probably ought to be per-cpu */
- x86_xsave_size = descs[2];
+ if (descs[2] > 512)
+ x86_fpu_save_size = descs[2];
x86_xsave_features = (uint64_t)descs[3] << 32 | descs[0];
}
diff -r 931886c8fac2 -r ec4e65baccaf sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Sun Feb 23 22:36:43 2014 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Sun Feb 23 22:38:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.62 2014/02/23 12:56:40 dsl Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.63 2014/02/23 22:38:40 dsl Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.62 2014/02/23 12:56:40 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.63 2014/02/23 22:38:40 dsl Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
@@ -1121,7 +1121,7 @@
const_sysctl(clog, "sse2", i386_has_sse2, CPU_SSE2);
const_sysctl(clog, "fpu_save", x86_fpu_save, CTL_CREATE);
- const_sysctl(clog, "xsave_size", x86_xsave_size, CTL_CREATE);
+ const_sysctl(clog, "fpu_save_size", x86_fpu_save_size, CTL_CREATE);
const_sysctl(clog, "xsave_features", x86_xsave_features, CTL_CREATE);
#ifndef XEN
Home |
Main Index |
Thread Index |
Old Index