diff options
Diffstat (limited to 'arch/sparc64/kernel/rtrap.S')
-rw-r--r-- | arch/sparc64/kernel/rtrap.S | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index fafd227735fa..090dcca00d2a 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -256,9 +256,8 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 | |||
256 | brnz,pn %l3, kern_rtt | 256 | brnz,pn %l3, kern_rtt |
257 | mov PRIMARY_CONTEXT, %l7 | 257 | mov PRIMARY_CONTEXT, %l7 |
258 | ldxa [%l7 + %l7] ASI_DMMU, %l0 | 258 | ldxa [%l7 + %l7] ASI_DMMU, %l0 |
259 | cplus_rtrap_insn_1: | 259 | sethi %hi(sparc64_kern_pri_nuc_bits), %l1 |
260 | sethi %hi(0), %l1 | 260 | ldx [%l1 + %lo(sparc64_kern_pri_nuc_bits)], %l1 |
261 | sllx %l1, 32, %l1 | ||
262 | or %l0, %l1, %l0 | 261 | or %l0, %l1, %l0 |
263 | stxa %l0, [%l7] ASI_DMMU | 262 | stxa %l0, [%l7] ASI_DMMU |
264 | flush %g6 | 263 | flush %g6 |
@@ -313,53 +312,36 @@ kern_fpucheck: ldub [%g6 + TI_FPDEPTH], %l5 | |||
313 | wr %g1, FPRS_FEF, %fprs | 312 | wr %g1, FPRS_FEF, %fprs |
314 | ldx [%o1 + %o5], %g1 | 313 | ldx [%o1 + %o5], %g1 |
315 | add %g6, TI_XFSR, %o1 | 314 | add %g6, TI_XFSR, %o1 |
316 | membar #StoreLoad | #LoadLoad | ||
317 | sll %o0, 8, %o2 | 315 | sll %o0, 8, %o2 |
318 | add %g6, TI_FPREGS, %o3 | 316 | add %g6, TI_FPREGS, %o3 |
319 | brz,pn %l6, 1f | 317 | brz,pn %l6, 1f |
320 | add %g6, TI_FPREGS+0x40, %o4 | 318 | add %g6, TI_FPREGS+0x40, %o4 |
321 | 319 | ||
320 | membar #Sync | ||
322 | ldda [%o3 + %o2] ASI_BLK_P, %f0 | 321 | ldda [%o3 + %o2] ASI_BLK_P, %f0 |
323 | ldda [%o4 + %o2] ASI_BLK_P, %f16 | 322 | ldda [%o4 + %o2] ASI_BLK_P, %f16 |
323 | membar #Sync | ||
324 | 1: andcc %l2, FPRS_DU, %g0 | 324 | 1: andcc %l2, FPRS_DU, %g0 |
325 | be,pn %icc, 1f | 325 | be,pn %icc, 1f |
326 | wr %g1, 0, %gsr | 326 | wr %g1, 0, %gsr |
327 | add %o2, 0x80, %o2 | 327 | add %o2, 0x80, %o2 |
328 | membar #Sync | ||
328 | ldda [%o3 + %o2] ASI_BLK_P, %f32 | 329 | ldda [%o3 + %o2] ASI_BLK_P, %f32 |
329 | ldda [%o4 + %o2] ASI_BLK_P, %f48 | 330 | ldda [%o4 + %o2] ASI_BLK_P, %f48 |
330 | |||
331 | 1: membar #Sync | 331 | 1: membar #Sync |
332 | ldx [%o1 + %o5], %fsr | 332 | ldx [%o1 + %o5], %fsr |
333 | 2: stb %l5, [%g6 + TI_FPDEPTH] | 333 | 2: stb %l5, [%g6 + TI_FPDEPTH] |
334 | ba,pt %xcc, rt_continue | 334 | ba,pt %xcc, rt_continue |
335 | nop | 335 | nop |
336 | 5: wr %g0, FPRS_FEF, %fprs | 336 | 5: wr %g0, FPRS_FEF, %fprs |
337 | membar #StoreLoad | #LoadLoad | ||
338 | sll %o0, 8, %o2 | 337 | sll %o0, 8, %o2 |
339 | 338 | ||
340 | add %g6, TI_FPREGS+0x80, %o3 | 339 | add %g6, TI_FPREGS+0x80, %o3 |
341 | add %g6, TI_FPREGS+0xc0, %o4 | 340 | add %g6, TI_FPREGS+0xc0, %o4 |
341 | membar #Sync | ||
342 | ldda [%o3 + %o2] ASI_BLK_P, %f32 | 342 | ldda [%o3 + %o2] ASI_BLK_P, %f32 |
343 | ldda [%o4 + %o2] ASI_BLK_P, %f48 | 343 | ldda [%o4 + %o2] ASI_BLK_P, %f48 |
344 | membar #Sync | 344 | membar #Sync |
345 | wr %g0, FPRS_DU, %fprs | 345 | wr %g0, FPRS_DU, %fprs |
346 | ba,pt %xcc, rt_continue | 346 | ba,pt %xcc, rt_continue |
347 | stb %l5, [%g6 + TI_FPDEPTH] | 347 | stb %l5, [%g6 + TI_FPDEPTH] |
348 | |||
349 | cplus_rinsn_1: | ||
350 | sethi %uhi(CTX_CHEETAH_PLUS_NUC), %l1 | ||
351 | |||
352 | .globl cheetah_plus_patch_rtrap | ||
353 | cheetah_plus_patch_rtrap: | ||
354 | /* We configure the dTLB512_0 for 4MB pages and the | ||
355 | * dTLB512_1 for 8K pages when in context zero. | ||
356 | */ | ||
357 | sethi %hi(cplus_rinsn_1), %o0 | ||
358 | sethi %hi(cplus_rtrap_insn_1), %o2 | ||
359 | lduw [%o0 + %lo(cplus_rinsn_1)], %o1 | ||
360 | or %o2, %lo(cplus_rtrap_insn_1), %o2 | ||
361 | stw %o1, [%o2] | ||
362 | flush %o2 | ||
363 | |||
364 | retl | ||
365 | nop | ||