aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/ttable.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-10 18:39:51 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:15 -0500
commit12eaa328f9fb2d3fcb5afb682c762690d05a3cd8 (patch)
treecce4e68b971757010a3e0bbf035fc65a381a3cd4 /include/asm-sparc64/ttable.h
parent18397944642cbca7fcd4a109b43ed5b4652e95b9 (diff)
[SPARC64]: Use ASI_SCRATCHPAD address 0x0 properly.
This is where the virtual address of the fault status area belongs. To set it up we don't make a hypervisor call, instead we call OBP's SUNW,set-trap-table with the real address of the fault status area as the second argument. And right before that call we write the virtual address into ASI_SCRATCHPAD vaddr 0x0. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/ttable.h')
-rw-r--r--include/asm-sparc64/ttable.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h
index 972f913709a3..6bb86a7a5b42 100644
--- a/include/asm-sparc64/ttable.h
+++ b/include/asm-sparc64/ttable.h
@@ -180,25 +180,25 @@
180#define KPROBES_TRAP(lvl) TRAP_ARG(bad_trap, lvl) 180#define KPROBES_TRAP(lvl) TRAP_ARG(bad_trap, lvl)
181#endif 181#endif
182 182
183#define SUN4V_ITSB_MISS \ 183#define SUN4V_ITSB_MISS \
184 mov SCRATCHPAD_CPUID, %g1; \ 184 ldxa [%g0] ASI_SCRATCHPAD, %g2; \
185 ldxa [%g1] ASI_SCRATCHPAD, %g2; \ 185 ldx [%g2 + HV_FAULT_I_ADDR_OFFSET], %g4; \
186 ldxa [%g1 + %g1] ASI_SCRATCHPAD, %g1;\ 186 ldx [%g2 + HV_FAULT_I_CTX_OFFSET], %g5; \
187 sethi %hi(trap_block), %g5; \ 187 srlx %g4, 22, %g7; \
188 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2; \ 188 sllx %g5, 48, %g6; \
189 or %g5, %lo(trap_block), %g5; \ 189 brz,pn %g5, kvmap_itlb_4v; \
190 ba,pt %xcc, sun4v_itsb_miss; \ 190 or %g6, %g7, %g6; \
191 add %g5, %g2, %g5; 191 ba,a,pt %xcc, sun4v_itsb_miss;
192 192
193#define SUN4V_DTSB_MISS \ 193#define SUN4V_DTSB_MISS \
194 mov SCRATCHPAD_CPUID, %g1; \ 194 ldxa [%g0] ASI_SCRATCHPAD, %g2; \
195 ldxa [%g1] ASI_SCRATCHPAD, %g2; \ 195 ldx [%g2 + HV_FAULT_D_ADDR_OFFSET], %g4; \
196 ldxa [%g1 + %g1] ASI_SCRATCHPAD, %g1;\ 196 ldx [%g2 + HV_FAULT_D_CTX_OFFSET], %g5; \
197 sethi %hi(trap_block), %g5; \ 197 srlx %g4, 22, %g7; \
198 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2; \ 198 sllx %g5, 48, %g6; \
199 or %g5, %lo(trap_block), %g5; \ 199 brz,pn %g5, kvmap_dtlb_4v; \
200 ba,pt %xcc, sun4v_dtsb_miss; \ 200 or %g6, %g7, %g6; \
201 add %g5, %g2, %g5; 201 ba,a,pt %xcc, sun4v_dtsb_miss;
202 202
203/* Before touching these macros, you owe it to yourself to go and 203/* Before touching these macros, you owe it to yourself to go and
204 * see how arch/sparc64/kernel/winfixup.S works... -DaveM 204 * see how arch/sparc64/kernel/winfixup.S works... -DaveM