Author: dchagin
Date: Thu May  9 21:42:43 2013
New Revision: 250423
URL: http://svnweb.freebsd.org/changeset/base/250423

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

Modified:
  head/sys/amd64/amd64/genassym.c
  head/sys/amd64/amd64/machdep.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/amd64/include/pcb.h
  head/sys/amd64/linux32/linux32_machdep.c
  head/sys/amd64/linux32/linux32_sysvec.c

Modified: head/sys/amd64/amd64/genassym.c
==============================================================================
--- head/sys/amd64/amd64/genassym.c     Thu May  9 21:29:16 2013        
(r250422)
+++ head/sys/amd64/amd64/genassym.c     Thu May  9 21:42:43 2013        
(r250423)
@@ -167,7 +167,6 @@ ASSYM(PCB_FPUSUSPEND, offsetof(struct pc
 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: head/sys/amd64/amd64/machdep.c
==============================================================================
--- head/sys/amd64/amd64/machdep.c      Thu May  9 21:29:16 2013        
(r250422)
+++ head/sys/amd64/amd64/machdep.c      Thu May  9 21:42:43 2013        
(r250423)
@@ -964,7 +964,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: head/sys/amd64/ia32/ia32_signal.c
==============================================================================
--- head/sys/amd64/ia32/ia32_signal.c   Thu May  9 21:29:16 2013        
(r250422)
+++ head/sys/amd64/ia32/ia32_signal.c   Thu May  9 21:42:43 2013        
(r250423)
@@ -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: head/sys/amd64/include/pcb.h
==============================================================================
--- head/sys/amd64/include/pcb.h        Thu May  9 21:29:16 2013        
(r250422)
+++ head/sys/amd64/include/pcb.h        Thu May  9 21:42:43 2013        
(r250423)
@@ -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: head/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- head/sys/amd64/linux32/linux32_machdep.c    Thu May  9 21:29:16 2013        
(r250422)
+++ head/sys/amd64/linux32/linux32_machdep.c    Thu May  9 21:42:43 2013        
(r250423)
@@ -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: head/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- head/sys/amd64/linux32/linux32_sysvec.c     Thu May  9 21:29:16 2013        
(r250422)
+++ head/sys/amd64/linux32/linux32_sysvec.c     Thu May  9 21:42:43 2013        
(r250423)
@@ -868,7 +868,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;
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to