rename i386 mdlwp flags from MDP_ to MDL_

to avoid confusion with mdproc flags which also have MDP_ prefixes.
This commit is contained in:
yamt 2004-01-28 10:48:55 +00:00
parent 20236bf218
commit 2a93afdfd5
6 changed files with 33 additions and 33 deletions

View File

@ -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 @@ setregs(l, pack, stack)
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 @@ cpu_getmcontext(l, mcp, flags)
*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 @@ cpu_setmcontext(l, mcp, flags)
}
}
/* 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;

View File

@ -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 @@ math_emulate(info, ksi)
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)

View File

@ -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 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
{
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 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
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 @@ process_write_fpregs(struct lwp *l, struct fpreg *regs)
{
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 @@ process_machdep_read_xmmregs(struct lwp *l, struct xmmregs *regs)
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 @@ process_machdep_read_xmmregs(struct lwp *l, struct xmmregs *regs)
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 @@ process_machdep_write_xmmregs(struct lwp *l, struct xmmregs *regs)
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));

View File

@ -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 @@ struct mdlwp {
};
/* md_flags */
#define MDP_USEDFPU 0x0001 /* has used the FPU */
#define MDL_USEDFPU 0x0001 /* has used the FPU */
struct mdproc {
/* Syscall handling function */

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.100 2004/01/26 19:43:25 scw Exp $");
* 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 @@ npxdna_xmm(struct cpu_info *ci)
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 @@ npxdna_s87(struct cpu_info *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_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

View File

@ -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 @@ linux_setregs(l, epp, stack)
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__;