Author: jkim
Date: Mon Aug  2 18:12:30 2010
New Revision: 210780
URL: http://svn.freebsd.org/changeset/base/210780

Log:
  Rearrange struct pcb.  r177532 (CVS r1.64 of pcb.h) moved pcb_flags to make
  better use of cache lines by placing it before pcb_save (now pcb_user_save),
  which is moved to the end of pcb since r210777.

Modified:
  head/sys/amd64/amd64/genassym.c
  head/sys/amd64/include/pcb.h

Modified: head/sys/amd64/amd64/genassym.c
==============================================================================
--- head/sys/amd64/amd64/genassym.c     Mon Aug  2 18:06:49 2010        
(r210779)
+++ head/sys/amd64/amd64/genassym.c     Mon Aug  2 18:12:30 2010        
(r210780)
@@ -135,7 +135,6 @@ ASSYM(PCB_RIP, offsetof(struct pcb, pcb_
 ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase));
 ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase));
 ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase));
-ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
 ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0));
 ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2));
 ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
@@ -146,6 +145,7 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_
 ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
 ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
 ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
+ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
 ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
 ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));

Modified: head/sys/amd64/include/pcb.h
==============================================================================
--- head/sys/amd64/include/pcb.h        Mon Aug  2 18:06:49 2010        
(r210779)
+++ head/sys/amd64/include/pcb.h        Mon Aug  2 18:12:30 2010        
(r210780)
@@ -55,15 +55,6 @@ struct pcb {
        register_t      pcb_fsbase;
        register_t      pcb_gsbase;
        register_t      pcb_kgsbase;
-       u_long          pcb_flags;
-#define        PCB_DBREGS      0x02    /* process using debug registers */
-#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) */
-#define        PCB_FULLCTX     0x80    /* full context restore on sysret */
-
        register_t      pcb_cr0;
        register_t      pcb_cr2;
        register_t      pcb_cr3;
@@ -75,6 +66,15 @@ struct pcb {
        register_t      pcb_dr6;
        register_t      pcb_dr7;
 
+       u_long          pcb_flags;
+#define        PCB_DBREGS      0x02    /* process using debug registers */
+#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) */
+#define        PCB_FULLCTX     0x80    /* full context restore on sysret */
+
        uint16_t        pcb_initial_fpucw;
 
        caddr_t         pcb_onfault; /* copyin/out fault recovery */
_______________________________________________
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