aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ktlb.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/ktlb.S')
-rw-r--r--arch/sparc/kernel/ktlb.S42
1 files changed, 38 insertions, 4 deletions
diff --git a/arch/sparc/kernel/ktlb.S b/arch/sparc/kernel/ktlb.S
index cef8defcd7a9..3ea6e8cde8c5 100644
--- a/arch/sparc/kernel/ktlb.S
+++ b/arch/sparc/kernel/ktlb.S
@@ -151,12 +151,46 @@ kvmap_dtlb_4v:
151 * Must preserve %g1 and %g6 (TAG). 151 * Must preserve %g1 and %g6 (TAG).
152 */ 152 */
153kvmap_dtlb_tsb4m_miss: 153kvmap_dtlb_tsb4m_miss:
154 sethi %hi(kpte_linear_bitmap), %g2 154 /* Clear the PAGE_OFFSET top virtual bits, shift
155 or %g2, %lo(kpte_linear_bitmap), %g2 155 * down to get PFN, and make sure PFN is in range.
156 */
157 sllx %g4, 21, %g5
156 158
157 /* Clear the PAGE_OFFSET top virtual bits, then shift 159 /* Check to see if we know about valid memory at the 4MB
158 * down to get a 256MB physical address index. 160 * chunk this physical address will reside within.
159 */ 161 */
162 srlx %g5, 21 + 41, %g2
163 brnz,pn %g2, kvmap_dtlb_longpath
164 nop
165
166 /* This unconditional branch and delay-slot nop gets patched
167 * by the sethi sequence once the bitmap is properly setup.
168 */
169 .globl valid_addr_bitmap_insn
170valid_addr_bitmap_insn:
171 ba,pt %xcc, 2f
172 nop
173 .subsection 2
174 .globl valid_addr_bitmap_patch
175valid_addr_bitmap_patch:
176 sethi %hi(sparc64_valid_addr_bitmap), %g7
177 or %g7, %lo(sparc64_valid_addr_bitmap), %g7
178 .previous
179
180 srlx %g5, 21 + 22, %g2
181 srlx %g2, 6, %g5
182 and %g2, 63, %g2
183 sllx %g5, 3, %g5
184 ldx [%g7 + %g5], %g5
185 mov 1, %g7
186 sllx %g7, %g2, %g7
187 andcc %g5, %g7, %g0
188 be,pn %xcc, kvmap_dtlb_longpath
189
1902: sethi %hi(kpte_linear_bitmap), %g2
191 or %g2, %lo(kpte_linear_bitmap), %g2
192
193 /* Get the 256MB physical address index. */
160 sllx %g4, 21, %g5 194 sllx %g4, 21, %g5
161 mov 1, %g7 195 mov 1, %g7
162 srlx %g5, 21 + 28, %g5 196 srlx %g5, 21 + 28, %g5