From 3f64e5a6c225e66057652096fc4b5405c95ddbdb Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Tue, 30 Oct 2001 00:53:19 +0000 Subject: [PATCH] MFi386: sys/i386/i386/machdep.c revisions 1.481 and 1.482 --- sys/pc98/i386/machdep.c | 7 +++++-- sys/pc98/pc98/machdep.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 620dda1747d..3420815813e 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -103,6 +103,7 @@ #include #include #include /* pcb.h included via sys/user.h */ +#include #include #ifdef PERFMON #include @@ -893,8 +894,8 @@ setregs(td, entry, stack, ps_strings) struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; - if (pcb->pcb_ldt) - user_ldt_free(pcb); + if (td->td_proc->p_md.md_ldt) + user_ldt_free(td); bzero((char *)regs, sizeof(struct trapframe)); regs->tf_eip = entry; @@ -976,7 +977,9 @@ cpu_setregs(void) unsigned int cr0; cr0 = rcr0(); +#ifdef SMP cr0 |= CR0_NE; /* Done by npxinit() */ +#endif cr0 |= CR0_MP | CR0_TS; /* Done at every execve() too. */ #ifndef I386_CPU cr0 |= CR0_WP | CR0_AM; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 620dda1747d..3420815813e 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -103,6 +103,7 @@ #include #include #include /* pcb.h included via sys/user.h */ +#include #include #ifdef PERFMON #include @@ -893,8 +894,8 @@ setregs(td, entry, stack, ps_strings) struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; - if (pcb->pcb_ldt) - user_ldt_free(pcb); + if (td->td_proc->p_md.md_ldt) + user_ldt_free(td); bzero((char *)regs, sizeof(struct trapframe)); regs->tf_eip = entry; @@ -976,7 +977,9 @@ cpu_setregs(void) unsigned int cr0; cr0 = rcr0(); +#ifdef SMP cr0 |= CR0_NE; /* Done by npxinit() */ +#endif cr0 |= CR0_MP | CR0_TS; /* Done at every execve() too. */ #ifndef I386_CPU cr0 |= CR0_WP | CR0_AM;