svn commit: r216457 - in stable/8/sys/amd64: amd64 ia32 include linux32

Konstantin Belousov kib at FreeBSD.org
Wed Dec 15 15:23:26 UTC 2010


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;
 }


More information about the svn-src-stable-8 mailing list