svn commit: r250785 - in stable/9/sys/amd64: amd64 ia32 include linux32

Dmitry Chagin dchagin at FreeBSD.org
Sat May 18 19:06:17 UTC 2013


Author: dchagin
Date: Sat May 18 19:06:15 2013
New Revision: 250785
URL: http://svnweb.freebsd.org/changeset/base/250785

Log:
  MFC r250423:
  
  Retire write-only PCB_GS32BIT pcb flag on amd64.

Modified:
  stable/9/sys/amd64/amd64/genassym.c
  stable/9/sys/amd64/amd64/machdep.c
  stable/9/sys/amd64/ia32/ia32_signal.c
  stable/9/sys/amd64/include/pcb.h
  stable/9/sys/amd64/linux32/linux32_machdep.c
  stable/9/sys/amd64/linux32/linux32_sysvec.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/genassym.c
==============================================================================
--- stable/9/sys/amd64/amd64/genassym.c	Sat May 18 18:28:19 2013	(r250784)
+++ stable/9/sys/amd64/amd64/genassym.c	Sat May 18 19:06:15 2013	(r250785)
@@ -160,7 +160,6 @@ ASSYM(PCB_USERFPU, sizeof(struct pcb));
 ASSYM(PCB_SIZE, sizeof(struct pcb));
 ASSYM(PCB_FULL_IRET, PCB_FULL_IRET);
 ASSYM(PCB_DBREGS, PCB_DBREGS);
-ASSYM(PCB_GS32BIT, PCB_GS32BIT);
 ASSYM(PCB_32BIT, PCB_32BIT);
 
 ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));

Modified: stable/9/sys/amd64/amd64/machdep.c
==============================================================================
--- stable/9/sys/amd64/amd64/machdep.c	Sat May 18 18:28:19 2013	(r250784)
+++ stable/9/sys/amd64/amd64/machdep.c	Sat May 18 19:06:15 2013	(r250785)
@@ -938,7 +938,7 @@ exec_setregs(struct thread *td, struct i
 	
 	pcb->pcb_fsbase = 0;
 	pcb->pcb_gsbase = 0;
-	clear_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT);
+	clear_pcb_flags(pcb, PCB_32BIT);
 	pcb->pcb_initial_fpucw = __INITIAL_FPUCW__;
 	set_pcb_flags(pcb, PCB_FULL_IRET);
 

Modified: stable/9/sys/amd64/ia32/ia32_signal.c
==============================================================================
--- stable/9/sys/amd64/ia32/ia32_signal.c	Sat May 18 18:28:19 2013	(r250784)
+++ stable/9/sys/amd64/ia32/ia32_signal.c	Sat May 18 19:06:15 2013	(r250785)
@@ -1001,6 +1001,5 @@ ia32_setregs(struct thread *td, struct i
 
 	/* Return via doreti so that we can change to a different %cs */
 	set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET);
-	clear_pcb_flags(pcb, PCB_GS32BIT);
 	td->td_retval[1] = 0;
 }

Modified: stable/9/sys/amd64/include/pcb.h
==============================================================================
--- stable/9/sys/amd64/include/pcb.h	Sat May 18 18:28:19 2013	(r250784)
+++ stable/9/sys/amd64/include/pcb.h	Sat May 18 19:06:15 2013	(r250785)
@@ -77,7 +77,6 @@ struct pcb {
 #define	PCB_KERNFPU	0x04	/* kernel uses fpu */
 #define	PCB_FPUINITDONE	0x08	/* fpu state is initialized */
 #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) */
 
 	uint16_t	pcb_initial_fpucw;

Modified: stable/9/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- stable/9/sys/amd64/linux32/linux32_machdep.c	Sat May 18 18:28:19 2013	(r250784)
+++ stable/9/sys/amd64/linux32/linux32_machdep.c	Sat May 18 19:06:15 2013	(r250785)
@@ -447,7 +447,7 @@ linux_set_cloned_tls(struct thread *td, 
 		pcb->pcb_gsbase = (register_t)info.base_addr;
 /* XXXKIB	pcb->pcb_gs32sd = sd; */
 		td->td_frame->tf_gs = GSEL(GUGS32_SEL, SEL_UPL);
-		set_pcb_flags(pcb, PCB_GS32BIT | PCB_32BIT);
+		set_pcb_flags(pcb, PCB_32BIT);
 	}
 
 	return (error);
@@ -1026,7 +1026,7 @@ linux_set_thread_area(struct thread *td,
 
 	pcb = td->td_pcb;
 	pcb->pcb_gsbase = (register_t)info.base_addr;
-	set_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT);
+	set_pcb_flags(pcb, PCB_32BIT);
 	update_gdt_gsbase(td, info.base_addr);
 
 	return (0);

Modified: stable/9/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- stable/9/sys/amd64/linux32/linux32_sysvec.c	Sat May 18 18:28:19 2013	(r250784)
+++ stable/9/sys/amd64/linux32/linux32_sysvec.c	Sat May 18 19:06:15 2013	(r250785)
@@ -867,7 +867,6 @@ exec_linux_setregs(struct thread *td, st
 
 	/* Do full restore on return so that we can change to a different %cs */
 	set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET);
-	clear_pcb_flags(pcb, PCB_GS32BIT);
 	td->td_retval[1] = 0;
 }
 


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