Author: kib
Date: Fri Feb 10 21:26:25 2012
New Revision: 231441
URL: http://svn.freebsd.org/changeset/base/231441

Log:
  In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for
  both 64bit and 32bit binaries, not for 64bit only.
  
  The set of the flag is not neccessary there, because the only current
  user of the cpu_set_user_tls() is create_thread(), which calls
  cpu_set_upcall() before and cpu_set_upcall() itself sets PCB_FULL_IRET.
  Change the function for consistency and preserve existing KPI for now.
  
  MFC after:    1 week

Modified:
  head/sys/amd64/amd64/vm_machdep.c

Modified: head/sys/amd64/amd64/vm_machdep.c
==============================================================================
--- head/sys/amd64/amd64/vm_machdep.c   Fri Feb 10 21:07:52 2012        
(r231440)
+++ head/sys/amd64/amd64/vm_machdep.c   Fri Feb 10 21:26:25 2012        
(r231441)
@@ -552,6 +552,7 @@ cpu_set_user_tls(struct thread *td, void
                return (EINVAL);
 
        pcb = td->td_pcb;
+       set_pcb_flags(pcb, PCB_FULL_IRET);
 #ifdef COMPAT_FREEBSD32
        if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) {
                pcb->pcb_gsbase = (register_t)tls_base;
@@ -559,7 +560,6 @@ cpu_set_user_tls(struct thread *td, void
        }
 #endif
        pcb->pcb_fsbase = (register_t)tls_base;
-       set_pcb_flags(pcb, PCB_FULL_IRET);
        return (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