From owner-svn-src-all@FreeBSD.ORG Tue Dec 7 12:17:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D09106567A; Tue, 7 Dec 2010 12:17:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 441098FC23; Tue, 7 Dec 2010 12:17:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB7CHidx065320; Tue, 7 Dec 2010 12:17:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB7CHiA4065312; Tue, 7 Dec 2010 12:17:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012071217.oB7CHiA4065312@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 7 Dec 2010 12:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216253 - in head/sys/amd64: amd64 ia32 include linux32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2010 12:17:44 -0000 Author: kib Date: Tue Dec 7 12:17:43 2010 New Revision: 216253 URL: http://svn.freebsd.org/changeset/base/216253 Log: Retire write-only PCB_FULLCTX pcb flag on amd64. Reminded by: Petr Salinger Tested by: pho MFC after: 1 week Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/ia32/ia32_signal.c head/sys/amd64/include/pcb.h head/sys/amd64/linux32/linux32_sysvec.c Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/amd64/exception.S Tue Dec 7 12:17:43 2010 (r216253) @@ -380,7 +380,6 @@ IDTVEC(fast_syscall) movq %rsp,%rdi call syscall movq PCPU(CURPCB),%rax - andq $~PCB_FULLCTX,PCB_FLAGS(%rax) MEXITCOUNT jmp doreti Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/amd64/genassym.c Tue Dec 7 12:17:43 2010 (r216253) @@ -161,7 +161,6 @@ ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_DBREGS, PCB_DBREGS); ASSYM(PCB_32BIT, PCB_32BIT); ASSYM(PCB_GS32BIT, PCB_GS32BIT); -ASSYM(PCB_FULLCTX, PCB_FULLCTX); ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0)); Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/amd64/machdep.c Tue Dec 7 12:17:43 2010 (r216253) @@ -492,7 +492,6 @@ sigreturn(td, uap) #endif kern_sigprocmask(td, SIG_SETMASK, &ucp->uc_sigmask, NULL, 0); - td->td_pcb->pcb_flags |= PCB_FULLCTX; td->td_pcb->pcb_full_iret = 1; return (EJUSTRETURN); } @@ -1908,7 +1907,6 @@ set_regs(struct thread *td, struct reg * tp->tf_gs = regs->r_gs; tp->tf_flags = TF_HASSEGS; } - td->td_pcb->pcb_flags |= PCB_FULLCTX; return (0); } @@ -2095,7 +2093,6 @@ set_mcontext(struct thread *td, const mc td->td_pcb->pcb_fsbase = mcp->mc_fsbase; td->td_pcb->pcb_gsbase = mcp->mc_gsbase; } - td->td_pcb->pcb_flags |= PCB_FULLCTX; td->td_pcb->pcb_full_iret = 1; return (0); } Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/amd64/vm_machdep.c Tue Dec 7 12:17:43 2010 (r216253) @@ -347,7 +347,6 @@ cpu_set_syscall_retval(struct thread *td */ td->td_frame->tf_rip -= td->td_frame->tf_err; td->td_frame->tf_r10 = td->td_frame->tf_rcx; - td->td_pcb->pcb_flags |= PCB_FULLCTX; break; case EJUSTRETURN: Modified: head/sys/amd64/ia32/ia32_signal.c ============================================================================== --- head/sys/amd64/ia32/ia32_signal.c Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/ia32/ia32_signal.c Tue Dec 7 12:17:43 2010 (r216253) @@ -207,7 +207,6 @@ ia32_set_mcontext(struct thread *td, con tp->tf_rflags = rflags; tp->tf_rsp = mcp->mc_esp; tp->tf_ss = mcp->mc_ss; - td->td_pcb->pcb_flags |= PCB_FULLCTX; td->td_pcb->pcb_full_iret = 1; return (0); } @@ -743,7 +742,7 @@ ia32_setregs(struct thread *td, struct i fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ - pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT; + pcb->pcb_flags |= PCB_32BIT; pcb->pcb_flags &= ~PCB_GS32BIT; td->td_pcb->pcb_full_iret = 1; td->td_retval[1] = 0; Modified: head/sys/amd64/include/pcb.h ============================================================================== --- head/sys/amd64/include/pcb.h Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/include/pcb.h Tue Dec 7 12:17:43 2010 (r216253) @@ -73,7 +73,6 @@ struct pcb { #define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ #define PCB_GS32BIT 0x20 /* linux gs switch */ #define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ -#define PCB_FULLCTX 0x80 /* full context restore on sysret */ uint16_t pcb_initial_fpucw; Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Tue Dec 7 12:04:06 2010 (r216252) +++ head/sys/amd64/linux32/linux32_sysvec.c Tue Dec 7 12:17:43 2010 (r216253) @@ -870,7 +870,7 @@ exec_linux_setregs(struct thread *td, st fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ - pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT; + pcb->pcb_flags |= PCB_32BIT; pcb->pcb_flags &= ~PCB_GS32BIT; td->td_retval[1] = 0; }