summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c6
-rw-r--r--sys/arch/i386/i386/pmap.c13
2 files changed, 2 insertions, 17 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index e1c6400b283..fe574ef39cd 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.393 2007/05/27 17:31:56 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.394 2007/05/27 21:33:25 tom Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2600,12 +2600,8 @@ setregs(struct proc *p, struct exec_package *pack, u_long stack,
* And update the GDT and LDT since we return to the user process
* by leaving the syscall (we don't do another pmap_activate()).
*/
-#ifdef MULTIPROCESSOR
curcpu()->ci_gdt[GUCODE_SEL].sd = pcb->pcb_ldt[LUCODE_SEL].sd =
pmap->pm_codeseg;
-#else
- gdt[GUCODE_SEL].sd = pcb->pcb_ldt[LUCODE_SEL].sd = pmap->pm_codeseg;
-#endif
/*
* And reset the hiexec marker in the pmap.
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 5fe984296be..f694ff32653 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.112 2007/05/25 15:55:26 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.113 2007/05/27 21:33:25 tom Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -668,12 +668,8 @@ setcslimit(struct pmap *pm, struct trapframe *tf, struct pcb *pcb,
/* And update the GDT and LDT since we may be called by the
* trap handler (cpu_switch won't get a chance).
*/
-#ifdef MULTIPROCESSOR
curcpu()->ci_gdt[GUCODE_SEL].sd = pcb->pcb_ldt[LUCODE_SEL].sd =
pm->pm_codeseg;
-#else
- gdt[GUCODE_SEL].sd = pcb->pcb_ldt[LUCODE_SEL].sd = pm->pm_codeseg;
-#endif
pcb->pcb_cs = tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
}
@@ -1672,9 +1668,7 @@ pmap_activate(struct proc *p)
{
struct pcb *pcb = &p->p_addr->u_pcb;
struct pmap *pmap = p->p_vmspace->vm_map.pmap;
-#ifdef MULTIPROCESSOR
struct cpu_info *self = curcpu();
-#endif
pcb->pcb_pmap = pmap;
/* Get the LDT that this process will actually use */
@@ -1690,13 +1684,8 @@ pmap_activate(struct proc *p)
* Set the correct descriptor value (i.e. with the
* correct code segment X limit) in the GDT and the LDT.
*/
-#ifdef MULTIPROCESSOR
self->ci_gdt[GUCODE_SEL].sd = pcb->pcb_ldt[LUCODE_SEL].sd =
pmap->pm_codeseg;
-#else
- gdt[GUCODE_SEL].sd = pcb->pcb_ldt[LUCODE_SEL].sd =
- pmap->pm_codeseg;
-#endif
lcr3(pcb->pcb_cr3);
lldt(pcb->pcb_ldt_sel);