From 5659e1960cafcb4bd281b097ebc35370e6a253ca Mon Sep 17 00:00:00 2001 From: fvdl Date: Sun, 26 May 2002 12:19:38 +0000 Subject: [PATCH] Remove use of pcb_fs and pcb_gs. --- sys/arch/x86_64/x86_64/netbsd32_machdep.c | 6 +++--- sys/arch/x86_64/x86_64/process_machdep.c | 4 +--- sys/arch/x86_64/x86_64/sys_machdep.c | 12 +----------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/sys/arch/x86_64/x86_64/netbsd32_machdep.c b/sys/arch/x86_64/x86_64/netbsd32_machdep.c index 12b106d85ddd..ce80c8585747 100644 --- a/sys/arch/x86_64/x86_64/netbsd32_machdep.c +++ b/sys/arch/x86_64/x86_64/netbsd32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.1 2001/06/19 00:21:17 fvdl Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.2 2002/05/26 12:19:38 fvdl Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -333,8 +333,8 @@ process_read_regs32(struct proc *p, struct reg32 *regs) struct trapframe *tf = p->p_md.md_regs; struct pcb *pcb = &p->p_addr->u_pcb; - regs->r_gs = pcb->pcb_gs; - regs->r_fs = pcb->pcb_fs; + regs->r_gs = LSEL(LUCODE32_SEL, SEL_UPL); + regs->r_fs = LSEL(LUCODE32_SEL, SEL_UPL); regs->r_es = LSEL(LUCODE32_SEL, SEL_UPL); regs->r_ds = LSEL(LUCODE32_SEL, SEL_UPL); regs->r_eflags = tf->tf_eflags; diff --git a/sys/arch/x86_64/x86_64/process_machdep.c b/sys/arch/x86_64/x86_64/process_machdep.c index 5703e3aeec08..092617459f4e 100644 --- a/sys/arch/x86_64/x86_64/process_machdep.c +++ b/sys/arch/x86_64/x86_64/process_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: process_machdep.c,v 1.1 2001/06/19 00:21:18 fvdl Exp $ */ +/* $NetBSD: process_machdep.c,v 1.2 2002/05/26 12:19:38 fvdl Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -234,8 +234,6 @@ process_write_regs(p, regs) simple_unlock(&pmap->pm_lock); - pcb->pcb_gs = regs->r_gs; - pcb->pcb_fs = regs->r_fs; tf->tf_eflags = regs->r_eflags; tf->tf_r15 = regs->r_r15; tf->tf_r14 = regs->r_r14; diff --git a/sys/arch/x86_64/x86_64/sys_machdep.c b/sys/arch/x86_64/x86_64/sys_machdep.c index 23d23cda3a88..d8b8b0669460 100644 --- a/sys/arch/x86_64/x86_64/sys_machdep.c +++ b/sys/arch/x86_64/x86_64/sys_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: sys_machdep.c,v 1.1 2001/06/19 00:21:18 fvdl Exp $ */ +/* $NetBSD: sys_machdep.c,v 1.2 2002/05/26 12:19:38 fvdl Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -142,7 +142,6 @@ x86_64_set_ldt(p, args, retval) int error, i, n; struct pcb *pcb = &p->p_addr->u_pcb; pmap_t pmap = p->p_vmspace->vm_map.pmap; - int fsslot, gsslot; struct x86_64_set_ldt_args ua; union descriptor desc; @@ -208,8 +207,6 @@ x86_64_set_ldt(p, args, retval) if (pcb == curpcb) savectx(curpcb); - fsslot = IDXSEL(pcb->pcb_fs); - gsslot = IDXSEL(pcb->pcb_gs); error = 0; /* Check descriptors for access violations. */ @@ -234,9 +231,6 @@ x86_64_set_ldt(p, args, retval) (gdt[IDXSEL(desc.gd.gd_selector)].sd.sd_dpl != SEL_UPL))) return (EACCES); - /* Can't replace in use descriptor with gate. */ - if (n == fsslot || n == gsslot) - return (EBUSY); break; case SDT_MEMEC: case SDT_MEMEAC: @@ -270,10 +264,6 @@ x86_64_set_ldt(p, args, retval) /* Only user (ring-3) descriptors may be present. */ if (desc.sd.sd_dpl != SEL_UPL) return (EACCES); - } else { - /* Must be "present" if in use. */ - if (n == fsslot || n == gsslot) - return (EBUSY); } }