diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-08 01:13:05 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:11:56 -0500 |
commit | 8b11bd12aff76e02cdc2cbc9e439bba88d281223 (patch) | |
tree | 903ab8830616bfbe5a821e4359f642842c8060a4 /arch/sparc64/kernel/entry.S | |
parent | 481295f982b21b1dbe71cbf41d3a93028fee30d1 (diff) |
[SPARC64]: Patch up mmu context register writes for sun4v.
sun4v uses ASI_MMU instead of ASI_DMMU
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/entry.S')
-rw-r--r-- | arch/sparc64/kernel/entry.S | 80 |
1 files changed, 70 insertions, 10 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 4ca3ea0beaf9..f51b66a1687a 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -97,10 +97,22 @@ do_fpdis: | |||
97 | add %g6, TI_FPREGS + 0x80, %g1 | 97 | add %g6, TI_FPREGS + 0x80, %g1 |
98 | faddd %f0, %f2, %f4 | 98 | faddd %f0, %f2, %f4 |
99 | fmuld %f0, %f2, %f6 | 99 | fmuld %f0, %f2, %f6 |
100 | ldxa [%g3] ASI_DMMU, %g5 | 100 | |
101 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
102 | .section .sun4v_1insn_patch, "ax" | ||
103 | .word 661b | ||
104 | ldxa [%g3] ASI_MMU, %g5 | ||
105 | .previous | ||
106 | |||
101 | sethi %hi(sparc64_kern_sec_context), %g2 | 107 | sethi %hi(sparc64_kern_sec_context), %g2 |
102 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | 108 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 |
103 | stxa %g2, [%g3] ASI_DMMU | 109 | |
110 | 661: stxa %g2, [%g3] ASI_DMMU | ||
111 | .section .sun4v_1insn_patch, "ax" | ||
112 | .word 661b | ||
113 | stxa %g2, [%g3] ASI_MMU | ||
114 | .previous | ||
115 | |||
104 | membar #Sync | 116 | membar #Sync |
105 | add %g6, TI_FPREGS + 0xc0, %g2 | 117 | add %g6, TI_FPREGS + 0xc0, %g2 |
106 | faddd %f0, %f2, %f8 | 118 | faddd %f0, %f2, %f8 |
@@ -126,11 +138,23 @@ do_fpdis: | |||
126 | fzero %f32 | 138 | fzero %f32 |
127 | mov SECONDARY_CONTEXT, %g3 | 139 | mov SECONDARY_CONTEXT, %g3 |
128 | fzero %f34 | 140 | fzero %f34 |
129 | ldxa [%g3] ASI_DMMU, %g5 | 141 | |
142 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
143 | .section .sun4v_1insn_patch, "ax" | ||
144 | .word 661b | ||
145 | ldxa [%g3] ASI_MMU, %g5 | ||
146 | .previous | ||
147 | |||
130 | add %g6, TI_FPREGS, %g1 | 148 | add %g6, TI_FPREGS, %g1 |
131 | sethi %hi(sparc64_kern_sec_context), %g2 | 149 | sethi %hi(sparc64_kern_sec_context), %g2 |
132 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | 150 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 |
133 | stxa %g2, [%g3] ASI_DMMU | 151 | |
152 | 661: stxa %g2, [%g3] ASI_DMMU | ||
153 | .section .sun4v_1insn_patch, "ax" | ||
154 | .word 661b | ||
155 | stxa %g2, [%g3] ASI_MMU | ||
156 | .previous | ||
157 | |||
134 | membar #Sync | 158 | membar #Sync |
135 | add %g6, TI_FPREGS + 0x40, %g2 | 159 | add %g6, TI_FPREGS + 0x40, %g2 |
136 | faddd %f32, %f34, %f36 | 160 | faddd %f32, %f34, %f36 |
@@ -155,10 +179,22 @@ do_fpdis: | |||
155 | nop | 179 | nop |
156 | 3: mov SECONDARY_CONTEXT, %g3 | 180 | 3: mov SECONDARY_CONTEXT, %g3 |
157 | add %g6, TI_FPREGS, %g1 | 181 | add %g6, TI_FPREGS, %g1 |
158 | ldxa [%g3] ASI_DMMU, %g5 | 182 | |
183 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
184 | .section .sun4v_1insn_patch, "ax" | ||
185 | .word 661b | ||
186 | ldxa [%g3] ASI_MMU, %g5 | ||
187 | .previous | ||
188 | |||
159 | sethi %hi(sparc64_kern_sec_context), %g2 | 189 | sethi %hi(sparc64_kern_sec_context), %g2 |
160 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | 190 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 |
161 | stxa %g2, [%g3] ASI_DMMU | 191 | |
192 | 661: stxa %g2, [%g3] ASI_DMMU | ||
193 | .section .sun4v_1insn_patch, "ax" | ||
194 | .word 661b | ||
195 | stxa %g2, [%g3] ASI_MMU | ||
196 | .previous | ||
197 | |||
162 | membar #Sync | 198 | membar #Sync |
163 | mov 0x40, %g2 | 199 | mov 0x40, %g2 |
164 | membar #Sync | 200 | membar #Sync |
@@ -169,7 +205,13 @@ do_fpdis: | |||
169 | ldda [%g1 + %g2] ASI_BLK_S, %f48 | 205 | ldda [%g1 + %g2] ASI_BLK_S, %f48 |
170 | membar #Sync | 206 | membar #Sync |
171 | fpdis_exit: | 207 | fpdis_exit: |
172 | stxa %g5, [%g3] ASI_DMMU | 208 | |
209 | 661: stxa %g5, [%g3] ASI_DMMU | ||
210 | .section .sun4v_1insn_patch, "ax" | ||
211 | .word 661b | ||
212 | stxa %g5, [%g3] ASI_MMU | ||
213 | .previous | ||
214 | |||
173 | membar #Sync | 215 | membar #Sync |
174 | fpdis_exit2: | 216 | fpdis_exit2: |
175 | wr %g7, 0, %gsr | 217 | wr %g7, 0, %gsr |
@@ -323,10 +365,22 @@ do_fptrap_after_fsr: | |||
323 | rd %gsr, %g3 | 365 | rd %gsr, %g3 |
324 | stx %g3, [%g6 + TI_GSR] | 366 | stx %g3, [%g6 + TI_GSR] |
325 | mov SECONDARY_CONTEXT, %g3 | 367 | mov SECONDARY_CONTEXT, %g3 |
326 | ldxa [%g3] ASI_DMMU, %g5 | 368 | |
369 | 661: ldxa [%g3] ASI_DMMU, %g5 | ||
370 | .section .sun4v_1insn_patch, "ax" | ||
371 | .word 661b | ||
372 | ldxa [%g3] ASI_MMU, %g5 | ||
373 | .previous | ||
374 | |||
327 | sethi %hi(sparc64_kern_sec_context), %g2 | 375 | sethi %hi(sparc64_kern_sec_context), %g2 |
328 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 | 376 | ldx [%g2 + %lo(sparc64_kern_sec_context)], %g2 |
329 | stxa %g2, [%g3] ASI_DMMU | 377 | |
378 | 661: stxa %g2, [%g3] ASI_DMMU | ||
379 | .section .sun4v_1insn_patch, "ax" | ||
380 | .word 661b | ||
381 | stxa %g2, [%g3] ASI_MMU | ||
382 | .previous | ||
383 | |||
330 | membar #Sync | 384 | membar #Sync |
331 | add %g6, TI_FPREGS, %g2 | 385 | add %g6, TI_FPREGS, %g2 |
332 | andcc %g1, FPRS_DL, %g0 | 386 | andcc %g1, FPRS_DL, %g0 |
@@ -341,7 +395,13 @@ do_fptrap_after_fsr: | |||
341 | stda %f48, [%g2 + %g3] ASI_BLK_S | 395 | stda %f48, [%g2 + %g3] ASI_BLK_S |
342 | 5: mov SECONDARY_CONTEXT, %g1 | 396 | 5: mov SECONDARY_CONTEXT, %g1 |
343 | membar #Sync | 397 | membar #Sync |
344 | stxa %g5, [%g1] ASI_DMMU | 398 | |
399 | 661: stxa %g5, [%g1] ASI_DMMU | ||
400 | .section .sun4v_1insn_patch, "ax" | ||
401 | .word 661b | ||
402 | stxa %g5, [%g1] ASI_MMU | ||
403 | .previous | ||
404 | |||
345 | membar #Sync | 405 | membar #Sync |
346 | ba,pt %xcc, etrap | 406 | ba,pt %xcc, etrap |
347 | wr %g0, 0, %fprs | 407 | wr %g0, 0, %fprs |