diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-03-14 23:34:13 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-03-14 23:34:13 +0000 |
commit | 44783319e929c332fc8baee64bb4d4144b10a16f (patch) | |
tree | 7bf9214a7e2db1ea1ddf4fe6659bff269394e172 /include | |
parent | d8f9ccce272840c053e4416324a065b8550bfc81 (diff) |
Simplify the get_new_mmu_context() interface that allocated TLB pids.
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips64/mmu_context.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-mips64/mmu_context.h b/include/asm-mips64/mmu_context.h index 878fe8300..c708365f3 100644 --- a/include/asm-mips64/mmu_context.h +++ b/include/asm-mips64/mmu_context.h @@ -33,8 +33,10 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, #define ASID_FIRST_VERSION ((unsigned long)(~ASID_VERSION_MASK) + 1) extern inline void -get_new_mmu_context(struct mm_struct *mm, unsigned long asid) +get_new_mmu_context(struct mm_struct *mm) { + unsigned long asid = asid_cache; + if (! ((asid += ASID_INC) & ASID_MASK) ) { flush_tlb_all(); /* start new asid cycle */ if (!asid) /* fix version if needed */ @@ -56,11 +58,9 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu) { - unsigned long asid = asid_cache; - /* Check if our ASID is of an older version and thus invalid */ - if ((next->context ^ asid) & ASID_VERSION_MASK) - get_new_mmu_context(next, asid); + if ((next->context ^ asid_cache) & ASID_VERSION_MASK) + get_new_mmu_context(next); current_pgd = next->pgd; set_entryhi(next->context); @@ -83,7 +83,7 @@ extern inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { /* Unconditionally get a new ASID. */ - get_new_mmu_context(next, asid_cache); + get_new_mmu_context(next); current_pgd = next->pgd; set_entryhi(next->context); |