aboutsummaryrefslogtreecommitdiff
path: root/sys/pc98
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-02-23 01:25:02 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-02-23 01:25:02 +0000
commitf1532aadeefd1f9ee9f9b5d94d049a54bb5bc0e6 (patch)
treeba3d3896f4228f9ccb25a9cb23b96d2ef8ce7b0c /sys/pc98
parent7aea583ef191ba44b47476846be42aa21c9e04b1 (diff)
downloadsrc-f1532aadeefd1f9ee9f9b5d94d049a54bb5bc0e6.tar.gz
src-f1532aadeefd1f9ee9f9b5d94d049a54bb5bc0e6.zip
Activate USER_LDT by default. The new thread libraries are going to
depend on this. The linux ABI emulator tries to use it for some linux binaries too. VM86 had a bigger cost than this and it was made default a while ago. Reviewed by: jhb, imp
Notes
Notes: svn path=/head/; revision=72930
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/i386/machdep.c9
-rw-r--r--sys/pc98/pc98/machdep.c9
2 files changed, 4 insertions, 14 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 429d97e220f4..1eee512472d5 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -49,7 +49,6 @@
#include "opt_msgbuf.h"
#include "opt_npx.h"
#include "opt_perfmon.h"
-#include "opt_user_ldt.h"
#include "opt_userconfig.h"
#include <sys/param.h>
@@ -1061,10 +1060,8 @@ setregs(p, entry, stack, ps_strings)
struct trapframe *regs = p->p_md.md_regs;
struct pcb *pcb = &p->p_addr->u_pcb;
-#ifdef USER_LDT
- /* was i386_user_cleanup() in NetBSD */
- user_ldt_free(pcb);
-#endif
+ if (pcb->pcb_ldt)
+ user_ldt_free(pcb);
bzero((char *)regs, sizeof(struct trapframe));
regs->tf_eip = entry;
@@ -2248,9 +2245,7 @@ init386(first)
_default_ldt = GSEL(GLDT_SEL, SEL_KPL);
lldt(_default_ldt);
-#ifdef USER_LDT
PCPU_SET(currentldt, _default_ldt);
-#endif
/* exceptions */
for (x = 0; x < NIDT; x++)
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 429d97e220f4..1eee512472d5 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -49,7 +49,6 @@
#include "opt_msgbuf.h"
#include "opt_npx.h"
#include "opt_perfmon.h"
-#include "opt_user_ldt.h"
#include "opt_userconfig.h"
#include <sys/param.h>
@@ -1061,10 +1060,8 @@ setregs(p, entry, stack, ps_strings)
struct trapframe *regs = p->p_md.md_regs;
struct pcb *pcb = &p->p_addr->u_pcb;
-#ifdef USER_LDT
- /* was i386_user_cleanup() in NetBSD */
- user_ldt_free(pcb);
-#endif
+ if (pcb->pcb_ldt)
+ user_ldt_free(pcb);
bzero((char *)regs, sizeof(struct trapframe));
regs->tf_eip = entry;
@@ -2248,9 +2245,7 @@ init386(first)
_default_ldt = GSEL(GLDT_SEL, SEL_KPL);
lldt(_default_ldt);
-#ifdef USER_LDT
PCPU_SET(currentldt, _default_ldt);
-#endif
/* exceptions */
for (x = 0; x < NIDT; x++)