diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/mmu_context.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index e81d719efcd1..c42562d801c5 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -106,15 +106,21 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
106 | static inline void | 106 | static inline void |
107 | get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) | 107 | get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) |
108 | { | 108 | { |
109 | extern void kvm_local_flush_tlb_all(void); | ||
109 | unsigned long asid = asid_cache(cpu); | 110 | unsigned long asid = asid_cache(cpu); |
110 | 111 | ||
111 | if (! ((asid += ASID_INC) & ASID_MASK) ) { | 112 | if (! ((asid += ASID_INC) & ASID_MASK) ) { |
112 | if (cpu_has_vtag_icache) | 113 | if (cpu_has_vtag_icache) |
113 | flush_icache_all(); | 114 | flush_icache_all(); |
115 | #ifdef CONFIG_VIRTUALIZATION | ||
116 | kvm_local_flush_tlb_all(); /* start new asid cycle */ | ||
117 | #else | ||
114 | local_flush_tlb_all(); /* start new asid cycle */ | 118 | local_flush_tlb_all(); /* start new asid cycle */ |
119 | #endif | ||
115 | if (!asid) /* fix version if needed */ | 120 | if (!asid) /* fix version if needed */ |
116 | asid = ASID_FIRST_VERSION; | 121 | asid = ASID_FIRST_VERSION; |
117 | } | 122 | } |
123 | |||
118 | cpu_context(cpu, mm) = asid_cache(cpu) = asid; | 124 | cpu_context(cpu, mm) = asid_cache(cpu) = asid; |
119 | } | 125 | } |
120 | 126 | ||