summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-02-23 01:25:02 +0000
committerpeter <peter@FreeBSD.org>2001-02-23 01:25:02 +0000
commit88a22127a8400148ac64930f4843800ec5ea843c (patch)
treeaaa218218d0222b010b83f5016331a051700c6e4 /sys/pc98
parent028498d58b228bc46acb76c35b3c3bfd10a950b1 (diff)
downloadFreeBSD-src-88a22127a8400148ac64930f4843800ec5ea843c.zip
FreeBSD-src-88a22127a8400148ac64930f4843800ec5ea843c.tar.gz
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
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 429d97e..1eee512 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 429d97e..1eee512 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++)
OpenPOWER on IntegriCloud