aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-01-31 18:33:12 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:11:23 -0800
commit6b6d017235acad3ee1681140795593723bb9b9df (patch)
tree5c7f279d483c3d270b6ef3f158239e4d38785a14
parent4da808c352c290d3f762933d44d4ab90c2fd65f3 (diff)
[SPARC64]: Use sparc64_highest_unlocked_tlb_ent in __tsb_context_switch()
Instead of ugly hard-coded value. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/tsb.S14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index 08405ed6928..c1532292a62 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -185,12 +185,14 @@ __tsb_context_switch:
*
* XXX Interactions with prom_world()...
*/
- mov TLB_TAG_ACCESS, %g1
- stxa %o2, [%g1] ASI_DMMU
- membar #Sync
- mov (61 << 3), %g1
- stxa %o3, [%g1] ASI_DTLB_DATA_ACCESS
- membar #Sync
+ sethi %hi(sparc64_highest_unlocked_tlb_ent), %o4
+ mov TLB_TAG_ACCESS, %g1
+ lduw [%o4 + %lo(sparc64_highest_unlocked_tlb_ent)], %g2
+ stxa %o2, [%g1] ASI_DMMU
+ membar #Sync
+ sllx %g2, 3, %g2
+ stxa %o3, [%g2] ASI_DTLB_DATA_ACCESS
+ membar #Sync
9:
wrpr %o5, %pstate