aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/head.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-10-04 18:23:20 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-10-04 18:23:20 -0400
commit0835ae0f27c0bfde67613d189ef6c537e004a6de (patch)
treead5cad209eeb11bd1bf49a3b5cffa49618c717c8 /arch/sparc64/kernel/head.S
parentdd7205ed0f022a2a5e60eb7404e6c9f49d2301c3 (diff)
[SPARC64]: Replace cheetah+ code patching with variables.
Instead of code patching to handle the page size fields in the context registers, just use variables from which we get the proper values. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/head.S')
-rw-r--r--arch/sparc64/kernel/head.S33
1 files changed, 5 insertions, 28 deletions
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 89406f9649a9..24340496cdd3 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -325,23 +325,7 @@ cheetah_tlb_fixup:
3251: sethi %hi(tlb_type), %g1 3251: sethi %hi(tlb_type), %g1
326 stw %g2, [%g1 + %lo(tlb_type)] 326 stw %g2, [%g1 + %lo(tlb_type)]
327 327
328 BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(g1,g7,1f) 328 /* Patch copy/page operations to cheetah optimized versions. */
329 ba,pt %xcc, 2f
330 nop
331
3321: /* Patch context register writes to support nucleus page
333 * size correctly.
334 */
335 call cheetah_plus_patch_etrap
336 nop
337 call cheetah_plus_patch_rtrap
338 nop
339 call cheetah_plus_patch_fpdis
340 nop
341 call cheetah_plus_patch_winfixup
342 nop
343
3442: /* Patch copy/page operations to cheetah optimized versions. */
345 call cheetah_patch_copyops 329 call cheetah_patch_copyops
346 nop 330 nop
347 call cheetah_patch_copy_page 331 call cheetah_patch_copy_page
@@ -484,20 +468,13 @@ spitfire_vpte_base:
484 call prom_set_trap_table 468 call prom_set_trap_table
485 sethi %hi(sparc64_ttable_tl0), %o0 469 sethi %hi(sparc64_ttable_tl0), %o0
486 470
487 BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(g2,g3,1f) 471 /* Start using proper page size encodings in ctx register. */
488 ba,pt %xcc, 2f 472 sethi %hi(sparc64_kern_pri_context), %g3
489 nop 473 ldx [%g3 + %lo(sparc64_kern_pri_context)], %g2
490
4911: /* Start using proper page size encodings in ctx register. */
492 sethi %uhi(CTX_CHEETAH_PLUS_NUC), %g3
493 mov PRIMARY_CONTEXT, %g1 474 mov PRIMARY_CONTEXT, %g1
494 sllx %g3, 32, %g3 475 stxa %g2, [%g1] ASI_DMMU
495 sethi %hi(CTX_CHEETAH_PLUS_CTX0), %g2
496 or %g3, %g2, %g3
497 stxa %g3, [%g1] ASI_DMMU
498 membar #Sync 476 membar #Sync
499 477
5002:
501 rdpr %pstate, %o1 478 rdpr %pstate, %o1
502 or %o1, PSTATE_IE, %o1 479 or %o1, PSTATE_IE, %o1
503 wrpr %o1, 0, %pstate 480 wrpr %o1, 0, %pstate