diff options
Diffstat (limited to 'arch/mips/include/asm/mmu_context.h')
-rw-r--r-- | arch/mips/include/asm/mmu_context.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index d9743536a621..6083db586500 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/hazards.h> | ||
19 | #include <asm/tlbflush.h> | 20 | #include <asm/tlbflush.h> |
20 | #ifdef CONFIG_MIPS_MT_SMTC | 21 | #ifdef CONFIG_MIPS_MT_SMTC |
21 | #include <asm/mipsmtregs.h> | 22 | #include <asm/mipsmtregs.h> |
@@ -36,11 +37,13 @@ extern unsigned long pgd_current[]; | |||
36 | #ifdef CONFIG_32BIT | 37 | #ifdef CONFIG_32BIT |
37 | #define TLBMISS_HANDLER_SETUP() \ | 38 | #define TLBMISS_HANDLER_SETUP() \ |
38 | write_c0_context((unsigned long) smp_processor_id() << 25); \ | 39 | write_c0_context((unsigned long) smp_processor_id() << 25); \ |
40 | back_to_back_c0_hazard(); \ | ||
39 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 41 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
40 | #endif | 42 | #endif |
41 | #ifdef CONFIG_64BIT | 43 | #ifdef CONFIG_64BIT |
42 | #define TLBMISS_HANDLER_SETUP() \ | 44 | #define TLBMISS_HANDLER_SETUP() \ |
43 | write_c0_context((unsigned long) smp_processor_id() << 26); \ | 45 | write_c0_context((unsigned long) smp_processor_id() << 26); \ |
46 | back_to_back_c0_hazard(); \ | ||
44 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 47 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
45 | #endif | 48 | #endif |
46 | 49 | ||
@@ -165,12 +168,12 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
165 | * having ASID_MASK smaller than the hardware maximum, | 168 | * having ASID_MASK smaller than the hardware maximum, |
166 | * make sure no "soft" bits become "hard"... | 169 | * make sure no "soft" bits become "hard"... |
167 | */ | 170 | */ |
168 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | 171 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | |
169 | | (cpu_context(cpu, next) & ASID_MASK)); | 172 | cpu_asid(cpu, next)); |
170 | ehb(); /* Make sure it propagates to TCStatus */ | 173 | ehb(); /* Make sure it propagates to TCStatus */ |
171 | evpe(mtflags); | 174 | evpe(mtflags); |
172 | #else | 175 | #else |
173 | write_c0_entryhi(cpu_context(cpu, next)); | 176 | write_c0_entryhi(cpu_asid(cpu, next)); |
174 | #endif /* CONFIG_MIPS_MT_SMTC */ | 177 | #endif /* CONFIG_MIPS_MT_SMTC */ |
175 | TLBMISS_HANDLER_SETUP_PGD(next->pgd); | 178 | TLBMISS_HANDLER_SETUP_PGD(next->pgd); |
176 | 179 | ||
@@ -226,11 +229,11 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
226 | } | 229 | } |
227 | /* See comments for similar code above */ | 230 | /* See comments for similar code above */ |
228 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | | 231 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | |
229 | (cpu_context(cpu, next) & ASID_MASK)); | 232 | cpu_asid(cpu, next)); |
230 | ehb(); /* Make sure it propagates to TCStatus */ | 233 | ehb(); /* Make sure it propagates to TCStatus */ |
231 | evpe(mtflags); | 234 | evpe(mtflags); |
232 | #else | 235 | #else |
233 | write_c0_entryhi(cpu_context(cpu, next)); | 236 | write_c0_entryhi(cpu_asid(cpu, next)); |
234 | #endif /* CONFIG_MIPS_MT_SMTC */ | 237 | #endif /* CONFIG_MIPS_MT_SMTC */ |
235 | TLBMISS_HANDLER_SETUP_PGD(next->pgd); | 238 | TLBMISS_HANDLER_SETUP_PGD(next->pgd); |
236 | 239 | ||