aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ktlb.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-17 21:01:02 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:13:34 -0500
commit8b234274418d6d79527c4ac3a72da446ca4cb35f (patch)
treeab4ab14fa7f1cab7889ecc2339f0261253a5d0e1 /arch/sparc64/kernel/ktlb.S
parent7adb37fe80d06cbd40de9b225b12a3a9ec40b6bb (diff)
[SPARC64]: More TLB/TSB handling fixes.
The SUN4V convention with non-shared TSBs is that the context bit of the TAG is clear. So we have to choose an "invalid" bit and initialize new TSBs appropriately. Otherwise a zero TAG looks "valid". Make sure, for the window fixup cases, that we use the right global registers and that we don't potentially trample on the live global registers in etrap/rtrap handling (%g2 and %g6) and that we put the missing virtual address properly in %g5. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/ktlb.S')
-rw-r--r--arch/sparc64/kernel/ktlb.S14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index 47dfd45971e8..ac29da915d09 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -52,8 +52,10 @@ kvmap_itlb_vmalloc_addr:
52 52
53 /* Load and check PTE. */ 53 /* Load and check PTE. */
54 ldxa [%g5] ASI_PHYS_USE_EC, %g5 54 ldxa [%g5] ASI_PHYS_USE_EC, %g5
55 mov 1, %g7
56 sllx %g7, TSB_TAG_INVALID_BIT, %g7
55 brgez,a,pn %g5, kvmap_itlb_longpath 57 brgez,a,pn %g5, kvmap_itlb_longpath
56 KTSB_STORE(%g1, %g0) 58 KTSB_STORE(%g1, %g7)
57 59
58 KTSB_WRITE(%g1, %g5, %g6) 60 KTSB_WRITE(%g1, %g5, %g6)
59 61
@@ -146,8 +148,10 @@ kvmap_dtlb_vmalloc_addr:
146 148
147 /* Load and check PTE. */ 149 /* Load and check PTE. */
148 ldxa [%g5] ASI_PHYS_USE_EC, %g5 150 ldxa [%g5] ASI_PHYS_USE_EC, %g5
151 mov 1, %g7
152 sllx %g7, TSB_TAG_INVALID_BIT, %g7
149 brgez,a,pn %g5, kvmap_dtlb_longpath 153 brgez,a,pn %g5, kvmap_dtlb_longpath
150 KTSB_STORE(%g1, %g0) 154 KTSB_STORE(%g1, %g7)
151 155
152 KTSB_WRITE(%g1, %g5, %g6) 156 KTSB_WRITE(%g1, %g5, %g6)
153 157
@@ -215,8 +219,8 @@ kvmap_dtlb_longpath:
215 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate 219 wrpr %g5, PSTATE_AG | PSTATE_MG, %pstate
216 .section .sun4v_2insn_patch, "ax" 220 .section .sun4v_2insn_patch, "ax"
217 .word 661b 221 .word 661b
218 nop 222 SET_GL(1)
219 nop 223 ldxa [%g0] ASI_SCRATCHPAD, %g5
220 .previous 224 .previous
221 225
222 rdpr %tl, %g3 226 rdpr %tl, %g3
@@ -226,7 +230,7 @@ kvmap_dtlb_longpath:
226 ldxa [%g4] ASI_DMMU, %g5 230 ldxa [%g4] ASI_DMMU, %g5
227 .section .sun4v_2insn_patch, "ax" 231 .section .sun4v_2insn_patch, "ax"
228 .word 661b 232 .word 661b
229 mov %g4, %g5 233 ldx [%g5 + HV_FAULT_D_ADDR_OFFSET], %g5
230 nop 234 nop
231 .previous 235 .previous
232 236