aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/ttable.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-09 19:12:22 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:05 -0500
commitaa9143b9719c07fb6f1f6207790c9c5086ae07e7 (patch)
tree74d56ecc53ed0542f200d6c6257c8f051095111c /include/asm-sparc64/ttable.h
parent12816ab38adddc9d7e9b3315d1739655dedc7c9f (diff)
[SPARC64]: Implement sun4v TSB miss handlers.
When we register a TSB with the hypervisor, so that it or hardware can handle TLB misses and do the TSB walk for us, the hypervisor traps down to these trap when it incurs a TSB miss. Processing is simple, we load the missing virtual address and context, and do a full page table walk. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/ttable.h')
-rw-r--r--include/asm-sparc64/ttable.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h
index f912f52c0c7f..972f913709a3 100644
--- a/include/asm-sparc64/ttable.h
+++ b/include/asm-sparc64/ttable.h
@@ -180,6 +180,26 @@
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 \
184 mov SCRATCHPAD_CPUID, %g1; \
185 ldxa [%g1] ASI_SCRATCHPAD, %g2; \
186 ldxa [%g1 + %g1] ASI_SCRATCHPAD, %g1;\
187 sethi %hi(trap_block), %g5; \
188 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2; \
189 or %g5, %lo(trap_block), %g5; \
190 ba,pt %xcc, sun4v_itsb_miss; \
191 add %g5, %g2, %g5;
192
193#define SUN4V_DTSB_MISS \
194 mov SCRATCHPAD_CPUID, %g1; \
195 ldxa [%g1] ASI_SCRATCHPAD, %g2; \
196 ldxa [%g1 + %g1] ASI_SCRATCHPAD, %g1;\
197 sethi %hi(trap_block), %g5; \
198 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2; \
199 or %g5, %lo(trap_block), %g5; \
200 ba,pt %xcc, sun4v_dtsb_miss; \
201 add %g5, %g2, %g5;
202
183/* 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
184 * see how arch/sparc64/kernel/winfixup.S works... -DaveM 204 * see how arch/sparc64/kernel/winfixup.S works... -DaveM
185 * 205 *