Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2006 04:58:54 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 93688 for review
Message-ID:  <200603210458.k2L4wsu6006824@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=93688

Change 93688 by kmacy@kmacy_storage:sun4vtmp on 2006/03/21 04:58:03

	add non control flow changes for spill/fill exception handlers to use
	physical addresses

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/genassym.c#13 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asmacros.h#11 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/pcb.h#8 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/pcpu.h#8 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/machdep.c#16 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sparc64/sparc64/genassym.c#13 (text+ko) ====

@@ -201,9 +201,6 @@
 ASSYM(PC_IRTAIL, offsetof(struct pcpu, pc_irtail));
 ASSYM(PC_IRFREE, offsetof(struct pcpu, pc_irfree));
 ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
-ASSYM(PC_TLB_CTX, offsetof(struct pcpu, pc_tlb_ctx));
-ASSYM(PC_TLB_CTX_MAX, offsetof(struct pcpu, pc_tlb_ctx_max));
-ASSYM(PC_TLB_CTX_MIN, offsetof(struct pcpu, pc_tlb_ctx_min));
 ASSYM(PC_CNT, offsetof(struct pcpu, pc_cnt));
 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
 
@@ -223,6 +220,9 @@
 ASSYM(PC_KWBUF, offsetof(struct pcpu, pc_kwbuf));
 ASSYM(PC_PMAP, offsetof(struct pcpu, pc_curpmap));
 #else
+ASSYM(PC_TLB_CTX, offsetof(struct pcpu, pc_tlb_ctx));
+ASSYM(PC_TLB_CTX_MAX, offsetof(struct pcpu, pc_tlb_ctx_max));
+ASSYM(PC_TLB_CTX_MIN, offsetof(struct pcpu, pc_tlb_ctx_min));
 ASSYM(PC_PMAP, offsetof(struct pcpu, pc_pmap));
 #endif 
 
@@ -273,6 +273,9 @@
 ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack));
 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
+ASSYM(TD_MD, offsetof(struct thread, td_md));
+ASSYM(MD_SAVED_PIL, offsetof(struct mdthread, md_saved_pil));
+
 
 ASSYM(PCB_SIZEOF, sizeof(struct pcb));
 ASSYM(PCB_RW, offsetof(struct pcb, pcb_rw));

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asmacros.h#11 (text+ko) ====

@@ -131,6 +131,14 @@
 #define GET_MMFSA_SCRATCH(reg)             \
 	ldxa [%g0 + %g0]ASI_SCRATCHPAD, reg;
 
+
+#define GET_PCPU_PHYS_SCRATCH(tmp)                      \
+        sethi %uhi(VM_MIN_DIRECT_ADDRESS), tmp;         \
+        mov  SCRATCH_REG_PCPU, PCPU_REG;                \
+        sllx tmp, 32, tmp;                              \
+        ldxa [%g0 + PCPU_REG]ASI_SCRATCHPAD, PCPU_REG;  \
+        andn PCPU_REG, tmp, PCPU_REG
+
 #define GET_PCPU_SCRATCH                    \
 	mov  SCRATCH_REG_PCPU, PCPU_REG;    \
         ldxa [%g0 + PCPU_REG]ASI_SCRATCHPAD, PCPU_REG;
@@ -171,6 +179,13 @@
 
 #define SET_SCRATCH(offsetreg, reg)   stxa reg, [%g0 + offsetreg]ASI_SCRATCHPAD
 
+
+#define GET_PCB_PHYS(tmp, reg)                    \
+        mov PC_CURPCB_RA, reg;                    \
+        GET_PCPU_PHYS_SCRATCH(tmp);               \
+        ldxa [PCPU_REG + reg]ASI_REAL, reg; 
+
+
 #define GET_PCB(reg)	    \
         GET_PCPU_SCRATCH;   \
         ldx [PCPU_REG + PC_CURPCB], reg;

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/pcb.h#8 (text+ko) ====

@@ -45,7 +45,7 @@
 	uint64_t pcb_nsaved;               /* number of windows saved in pcb_rw */
 	uint64_t pcb_pc;
 	uint64_t pcb_sp;
-	uint64_t pcb_pa;                   /* physical address of pcb */
+	uint64_t pcb_ra;                   /* physical address of pcb */
 	uint64_t pcb_pad[4]; 
 } __aligned(64);
 

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/pcpu.h#8 (text+ko) ====

@@ -74,10 +74,8 @@
 	struct rwindow pc_kwbuf;                                        \
 	u_long  pc_kwbuf_sp;                                            \
 	u_int   pc_kwbuf_full;                                          \
-	u_int	pc_node;						\
-	u_int	pc_tlb_ctx;						\
-	u_int	pc_tlb_ctx_max;						\
-	u_int	pc_tlb_ctx_min
+	u_int   pc_node;                                                \
+	u_long  pc_curpcb_ra;
 
 	/* XXX SUN4V_FIXME - as we access the *_ra and *_size fields in quick
 	 * succession we _really_ want them to be L1 cache line size aligned

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/machdep.c#16 (text+ko) ====

@@ -384,9 +384,6 @@
 #endif
 	pc->pc_addr = (vm_offset_t)pcpu0;
 	pc->pc_node = child;
-	pc->pc_tlb_ctx = TLB_CTX_USER_MIN;
-	pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN;
-	pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX;
 
 	/*
 	 * Initialize global registers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603210458.k2L4wsu6006824>