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 Simplify macro logic of cpu_probe_old_fpu



details:   https://anonhg.NetBSD.org/src/rev/345888986087
branches:  trunk
changeset: 827032:345888986087
user:      maya <maya%NetBSD.org@localhost>
date:      Mon Oct 09 17:39:33 2017 +0000

description:
Simplify macro logic of cpu_probe_old_fpu

diffstat:

 sys/arch/x86/x86/identcpu.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 3278cf11a6ee -r 345888986087 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Mon Oct 09 15:53:45 2017 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Mon Oct 09 17:39:33 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: identcpu.c,v 1.57 2017/09/12 07:19:36 msaitoh Exp $    */
+/*     $NetBSD: identcpu.c,v 1.58 2017/10/09 17:39:33 maya 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.57 2017/09/12 07:19:36 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.58 2017/10/09 17:39:33 maya Exp $");
 
 #include "opt_xen.h"
 
@@ -701,12 +701,10 @@
 #undef PCI_MODE1_DATA_REG
 }
 
-#if !defined(__i386__) || defined(XEN)
-#define cpu_probe_old_fpu(ci)
-#else
 static void
 cpu_probe_old_fpu(struct cpu_info *ci)
 {
+#if defined(__i386__) && !defined(XEN)
        uint16_t control;
 
        /* Check that there really is an fpu (496SX) */
@@ -727,8 +725,8 @@
                i386_fpu_fdivbug = 1;
 
        stts();
+#endif
 }
-#endif
 
 static void
 cpu_probe_fpu(struct cpu_info *ci)



Home | Main Index | Thread Index | Old Index