Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys rename i386 mdlwp flags from MDP_ to MDL_



details:   https://anonhg.NetBSD.org/src/rev/d64983a94c08
branches:  trunk
changeset: 558079:d64983a94c08
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Jan 28 10:48:55 2004 +0000

description:
rename i386 mdlwp flags from MDP_ to MDL_
to avoid confusion with mdproc flags which also have MDP_ prefixes.

diffstat:

 sys/arch/i386/i386/machdep.c               |  10 +++++-----
 sys/arch/i386/i386/math_emulate.c          |   8 ++++----
 sys/arch/i386/i386/process_machdep.c       |  20 ++++++++++----------
 sys/arch/i386/include/proc.h               |   4 ++--
 sys/arch/i386/isa/npx.c                    |  18 +++++++++---------
 sys/compat/linux/arch/i386/linux_machdep.c |   6 +++---
 6 files changed, 33 insertions(+), 33 deletions(-)

diffs (274 lines):

diff -r 9ff09898bf2e -r d64983a94c08 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Wed Jan 28 10:43:50 2004 +0000
+++ b/sys/arch/i386/i386/machdep.c      Wed Jan 28 10:48:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.547 2003/12/30 12:33:22 pk Exp $ */
+/*     $NetBSD: machdep.c,v 1.548 2004/01/28 10:48:55 yamt Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.547 2003/12/30 12:33:22 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.548 2004/01/28 10:48:55 yamt Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -1089,7 +1089,7 @@
        pmap_ldt_cleanup(l);
 #endif
 
-       l->l_md.md_flags &= ~MDP_USEDFPU;
+       l->l_md.md_flags &= ~MDL_USEDFPU;
        if (i386_use_fxsave) {
                pcb->pcb_savefpu.sv_xmm.sv_env.en_cw = __NetBSD_NPXCW__;
                pcb->pcb_savefpu.sv_xmm.sv_env.en_mxcsr = __INITIAL_MXCSR__;
@@ -2129,7 +2129,7 @@
        *flags |= _UC_CPU;
 
        /* Save floating point register context, if any. */
-       if ((l->l_md.md_flags & MDP_USEDFPU) != 0) {
+       if ((l->l_md.md_flags & MDL_USEDFPU) != 0) {
 #if NNPX > 0
                /*
                 * If this process is the current FP owner, dump its
@@ -2252,7 +2252,7 @@
                        }
                }
                /* If not set already. */
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
 #if 0
                /* Apparently unused. */
                l->l_addr->u_pcb.pcb_saveemc = mcp->mc_fp.fp_emcsts;
diff -r 9ff09898bf2e -r d64983a94c08 sys/arch/i386/i386/math_emulate.c
--- a/sys/arch/i386/i386/math_emulate.c Wed Jan 28 10:43:50 2004 +0000
+++ b/sys/arch/i386/i386/math_emulate.c Wed Jan 28 10:48:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: math_emulate.c,v 1.27 2003/10/08 00:28:41 thorpej Exp $        */
+/*     $NetBSD: math_emulate.c,v 1.28 2004/01/28 10:48:55 yamt Exp $   */
 
 /*
  * expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: math_emulate.c,v 1.27 2003/10/08 00:28:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: math_emulate.c,v 1.28 2004/01/28 10:48:55 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -97,14 +97,14 @@
                panic("math emulator called from supervisor mode");
 
        /* ever used fp? */
-       if ((l->l_md.md_flags & MDP_USEDFPU) == 0) {
+       if ((l->l_md.md_flags & MDL_USEDFPU) == 0) {
                if (i386_use_fxsave)
                        cw = l->l_addr->u_pcb.pcb_savefpu.sv_xmm.sv_env.en_cw;
                else
                        cw = l->l_addr->u_pcb.pcb_savefpu.sv_87.sv_env.en_cw;
                fninit();
                I387.cwd = cw;
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
        }
 
        if (I387.cwd & I387.swd & 0x3f)
diff -r 9ff09898bf2e -r d64983a94c08 sys/arch/i386/i386/process_machdep.c
--- a/sys/arch/i386/i386/process_machdep.c      Wed Jan 28 10:43:50 2004 +0000
+++ b/sys/arch/i386/i386/process_machdep.c      Wed Jan 28 10:48:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.50 2003/10/27 14:11:47 junyoung Exp $    */
+/*     $NetBSD: process_machdep.c,v 1.51 2004/01/28 10:48:55 yamt Exp $        */
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.50 2003/10/27 14:11:47 junyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.51 2004/01/28 10:48:55 yamt Exp $");
 
 #include "opt_vm86.h"
 #include "npx.h"
@@ -252,7 +252,7 @@
 {
        union savefpu *frame = process_fpframe(l);
 
-       if (l->l_md.md_flags & MDP_USEDFPU) {
+       if (l->l_md.md_flags & MDL_USEDFPU) {
 #if NNPX > 0
                npxsave_lwp(l, 1);
 #endif
@@ -280,7 +280,7 @@
                        frame->sv_87.sv_env.en_sw = 0x0000;
                        frame->sv_87.sv_env.en_tw = 0xffff;
                }
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
        }
 
        if (i386_use_fxsave) {
@@ -354,12 +354,12 @@
 {
        union savefpu *frame = process_fpframe(l);
 
-       if (l->l_md.md_flags & MDP_USEDFPU) {
+       if (l->l_md.md_flags & MDL_USEDFPU) {
 #if NNPX > 0
                npxsave_lwp(l, 0);
 #endif
        } else {
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
        }
 
        if (i386_use_fxsave) {
@@ -405,7 +405,7 @@
        if (i386_use_fxsave == 0)
                return (EINVAL);
 
-       if (l->l_md.md_flags & MDP_USEDFPU) {
+       if (l->l_md.md_flags & MDL_USEDFPU) {
 #if NNPX > 0
                if (l->l_addr->u_pcb.pcb_fpcpu != NULL)
                        npxsave_lwp(l, 1);
@@ -426,7 +426,7 @@
                frame->sv_xmm.sv_env.en_sw = 0x0000;
                frame->sv_xmm.sv_env.en_tw = 0x00;
 
-               l->l_md.md_flags |= MDP_USEDFPU;  
+               l->l_md.md_flags |= MDL_USEDFPU;  
        }
 
        memcpy(regs, &frame->sv_xmm, sizeof(*regs));
@@ -441,14 +441,14 @@
        if (i386_use_fxsave == 0)
                return (EINVAL);
 
-       if (l->l_md.md_flags & MDP_USEDFPU) {
+       if (l->l_md.md_flags & MDL_USEDFPU) {
 #if NNPX > 0
                /* If we were using the FPU, drop it. */
                if (l->l_addr->u_pcb.pcb_fpcpu != NULL)
                        npxsave_lwp(l, 0);
 #endif
        } else {
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
        }
 
        memcpy(&frame->sv_xmm, regs, sizeof(*regs));
diff -r 9ff09898bf2e -r d64983a94c08 sys/arch/i386/include/proc.h
--- a/sys/arch/i386/include/proc.h      Wed Jan 28 10:43:50 2004 +0000
+++ b/sys/arch/i386/include/proc.h      Wed Jan 28 10:48:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.24 2004/01/14 11:29:40 yamt Exp $   */
+/*     $NetBSD: proc.h,v 1.25 2004/01/28 10:48:55 yamt Exp $   */
 
 /*
  * Copyright (c) 1991 Regents of the University of California.
@@ -50,7 +50,7 @@
 };
 
 /* md_flags */
-#define        MDP_USEDFPU     0x0001  /* has used the FPU */
+#define        MDL_USEDFPU     0x0001  /* has used the FPU */
 
 struct mdproc {
                                        /* Syscall handling function */
diff -r 9ff09898bf2e -r d64983a94c08 sys/arch/i386/isa/npx.c
--- a/sys/arch/i386/isa/npx.c   Wed Jan 28 10:43:50 2004 +0000
+++ b/sys/arch/i386/isa/npx.c   Wed Jan 28 10:48:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npx.c,v 1.100 2004/01/26 19:43:25 scw Exp $    */
+/*     $NetBSD: npx.c,v 1.101 2004/01/28 10:48:55 yamt Exp $   */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.100 2004/01/26 19:43:25 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.101 2004/01/28 10:48:55 yamt Exp $");
 
 #if 0
 #define IPRINTF(x)     printf x
@@ -109,17 +109,17 @@
  * 387 and 287 Numeric Coprocessor Extension (NPX) Driver.
  *
  * We do lazy initialization and switching using the TS bit in cr0 and the
- * MDP_USEDFPU bit in mdproc.
+ * MDL_USEDFPU bit in mdlwp.
  *
  * DNA exceptions are handled like this:
  *
  * 1) If there is no NPX, return and go to the emulator.
  * 2) If someone else has used the NPX, save its state into that process's PCB.
- * 3a) If MDP_USEDFPU is not set, set it and initialize the NPX.
+ * 3a) If MDL_USEDFPU is not set, set it and initialize the NPX.
  * 3b) Otherwise, reload the process's previous NPX state.
  *
  * When a process is created or exec()s, its saved cr0 image has the TS bit
- * set and the MDP_USEDFPU bit clear.  The MDP_USEDFPU bit is set when the
+ * set and the MDL_USEDFPU bit clear.  The MDL_USEDFPU bit is set when the
  * process first gets a DNA and the NPX is initialized.  The TS bit is turned
  * off when the NPX is used, and turned on again later when the process's NPX
  * state is saved.
@@ -573,9 +573,9 @@
        l->l_addr->u_pcb.pcb_fpcpu = ci;
        splx(s);
 
-       if ((l->l_md.md_flags & MDP_USEDFPU) == 0) {
+       if ((l->l_md.md_flags & MDL_USEDFPU) == 0) {
                fldcw(&l->l_addr->u_pcb.pcb_savefpu.sv_xmm.sv_env.en_cw);
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
        } else {
                fxrstor(&l->l_addr->u_pcb.pcb_savefpu.sv_xmm);
        }
@@ -637,9 +637,9 @@
        splx(s);
 
 
-       if ((l->l_md.md_flags & MDP_USEDFPU) == 0) {
+       if ((l->l_md.md_flags & MDL_USEDFPU) == 0) {
                fldcw(&l->l_addr->u_pcb.pcb_savefpu.sv_87.sv_env.en_cw);
-               l->l_md.md_flags |= MDP_USEDFPU;
+               l->l_md.md_flags |= MDL_USEDFPU;
        } else {
                /*
                 * The following frstor may cause an IRQ13 when the state being
diff -r 9ff09898bf2e -r d64983a94c08 sys/compat/linux/arch/i386/linux_machdep.c
--- a/sys/compat/linux/arch/i386/linux_machdep.c        Wed Jan 28 10:43:50 2004 +0000
+++ b/sys/compat/linux/arch/i386/linux_machdep.c        Wed Jan 28 10:48:55 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.101 2003/12/08 17:51:53 christos Exp $     */
+/*     $NetBSD: linux_machdep.c,v 1.102 2004/01/28 10:48:55 yamt Exp $ */
 
 /*-
  * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.101 2003/12/08 17:51:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.102 2004/01/28 10:48:55 yamt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vm86.h"
@@ -154,7 +154,7 @@
        pmap_ldt_cleanup(l);
 #endif
 
-       l->l_md.md_flags &= ~MDP_USEDFPU;
+       l->l_md.md_flags &= ~MDL_USEDFPU;
 
        if (i386_use_fxsave) {
                pcb->pcb_savefpu.sv_xmm.sv_env.en_cw = __Linux_NPXCW__;



Home | Main Index | Thread Index | Old Index