aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/tsb.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-11 03:29:34 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:16 -0500
commit36a68e77c554f1ef1c206fd618e6daf82d3e38a3 (patch)
tree59a4591b76ef18e54b5b1b2687268e0dd6bb69ef /arch/sparc64/kernel/tsb.S
parent12eaa328f9fb2d3fcb5afb682c762690d05a3cd8 (diff)
[SPARC64]: Simplify sun4v TLB handling using macros.
There was also a bug in sun4v_itlb_miss, it loaded the MMU Fault Status base into %g3 instead of %g2. This pointed out a fast path for TSB miss processing, since we have %g2 with the MMU Fault Status base, we can use that to quickly load up the PGD phys address. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/tsb.S')
-rw-r--r--arch/sparc64/kernel/tsb.S18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index 8a9351258af8..667dcb077be7 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -25,26 +25,24 @@
25 */ 25 */
26tsb_miss_dtlb: 26tsb_miss_dtlb:
27 mov TLB_TAG_ACCESS, %g4 27 mov TLB_TAG_ACCESS, %g4
28 ldxa [%g4] ASI_DMMU, %g4
29 ba,pt %xcc, tsb_miss_page_table_walk 28 ba,pt %xcc, tsb_miss_page_table_walk
30 nop 29 ldxa [%g4] ASI_DMMU, %g4
31 30
32tsb_miss_itlb: 31tsb_miss_itlb:
33 mov TLB_TAG_ACCESS, %g4 32 mov TLB_TAG_ACCESS, %g4
34 ldxa [%g4] ASI_IMMU, %g4
35 ba,pt %xcc, tsb_miss_page_table_walk 33 ba,pt %xcc, tsb_miss_page_table_walk
36 nop 34 ldxa [%g4] ASI_IMMU, %g4
37 35
38 /* The sun4v TLB miss handlers jump directly here instead 36 /* At this point we have:
39 * of tsb_miss_{d,i}tlb with registers setup as follows: 37 * %g4 -- missing virtual address
40 * 38 * %g1 -- TSB entry address
41 * %g4: missing virtual address 39 * %g6 -- TAG TARGET ((vaddr >> 22) | (ctx << 48))
42 * %g1: TSB entry address loaded
43 * %g6: TAG TARGET ((vaddr >> 22) | (ctx << 48))
44 */ 40 */
45tsb_miss_page_table_walk: 41tsb_miss_page_table_walk:
46 TRAP_LOAD_PGD_PHYS(%g7, %g5) 42 TRAP_LOAD_PGD_PHYS(%g7, %g5)
47 43
44 /* And now we have the PGD base physical address in %g7. */
45tsb_miss_page_table_walk_sun4v_fastpath:
48 USER_PGTABLE_WALK_TL1(%g4, %g7, %g5, %g2, tsb_do_fault) 46 USER_PGTABLE_WALK_TL1(%g4, %g7, %g5, %g2, tsb_do_fault)
49 47
50tsb_reload: 48tsb_reload: