From owner-svn-src-all@FreeBSD.ORG Wed Dec 15 15:23:26 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 182CA1065673; Wed, 15 Dec 2010 15:23:26 +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 052F28FC0A; Wed, 15 Dec 2010 15:23:26 +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 oBFFNP3N056194; Wed, 15 Dec 2010 15:23:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFFNPAQ056186; Wed, 15 Dec 2010 15:23:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012151523.oBFFNPAQ056186@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 15 Dec 2010 15:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216457 - in stable/8/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: Wed, 15 Dec 2010 15:23:26 -0000 Author: kib Date: Wed Dec 15 15:23:25 2010 New Revision: 216457 URL: http://svn.freebsd.org/changeset/base/216457 Log: MFC r216253: Retire write-only PCB_FULLCTX pcb flag on amd64. Approved by: re (bz) Modified: stable/8/sys/amd64/amd64/exception.S stable/8/sys/amd64/amd64/genassym.c stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/amd64/vm_machdep.c stable/8/sys/amd64/ia32/ia32_signal.c stable/8/sys/amd64/include/pcb.h stable/8/sys/amd64/linux32/linux32_sysvec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/exception.S Wed Dec 15 15:23:25 2010 (r216457) @@ -376,7 +376,6 @@ IDTVEC(fast_syscall) movq %rsp,%rdi call syscall movq PCPU(CURPCB),%rax - andq $~PCB_FULLCTX,PCB_FLAGS(%rax) MEXITCOUNT jmp doreti Modified: stable/8/sys/amd64/amd64/genassym.c ============================================================================== --- stable/8/sys/amd64/amd64/genassym.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/genassym.c Wed Dec 15 15:23:25 2010 (r216457) @@ -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: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/machdep.c Wed Dec 15 15:23:25 2010 (r216457) @@ -488,7 +488,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); } @@ -1897,7 +1896,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); } @@ -2084,7 +2082,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: stable/8/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/vm_machdep.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/vm_machdep.c Wed Dec 15 15:23:25 2010 (r216457) @@ -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: stable/8/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/8/sys/amd64/ia32/ia32_signal.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/ia32/ia32_signal.c Wed Dec 15 15:23:25 2010 (r216457) @@ -206,7 +206,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); } @@ -746,7 +745,7 @@ ia32_setregs(td, entry, stack, ps_string 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: stable/8/sys/amd64/include/pcb.h ============================================================================== --- stable/8/sys/amd64/include/pcb.h Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/include/pcb.h Wed Dec 15 15:23:25 2010 (r216457) @@ -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: stable/8/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Dec 15 15:23:25 2010 (r216457) @@ -880,7 +880,7 @@ exec_linux_setregs(td, entry, stack, ps_ 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; }