aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/tlbex.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/tlbex.c')
-rw-r--r--arch/mips/mm/tlbex.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 37b1cb246332..65b6e85447b1 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -932,6 +932,8 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
932 * to mimic that here by taking a load/istream page 932 * to mimic that here by taking a load/istream page
933 * fault. 933 * fault.
934 */ 934 */
935 if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
936 uasm_i_sync(p, 0);
935 UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0); 937 UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0);
936 uasm_i_jr(p, ptr); 938 uasm_i_jr(p, ptr);
937 939
@@ -1646,6 +1648,8 @@ static void
1646iPTE_LW(u32 **p, unsigned int pte, unsigned int ptr) 1648iPTE_LW(u32 **p, unsigned int pte, unsigned int ptr)
1647{ 1649{
1648#ifdef CONFIG_SMP 1650#ifdef CONFIG_SMP
1651 if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
1652 uasm_i_sync(p, 0);
1649# ifdef CONFIG_PHYS_ADDR_T_64BIT 1653# ifdef CONFIG_PHYS_ADDR_T_64BIT
1650 if (cpu_has_64bits) 1654 if (cpu_has_64bits)
1651 uasm_i_lld(p, pte, 0, ptr); 1655 uasm_i_lld(p, pte, 0, ptr);
@@ -2259,6 +2263,8 @@ static void build_r4000_tlb_load_handler(void)
2259#endif 2263#endif
2260 2264
2261 uasm_l_nopage_tlbl(&l, p); 2265 uasm_l_nopage_tlbl(&l, p);
2266 if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
2267 uasm_i_sync(&p, 0);
2262 build_restore_work_registers(&p); 2268 build_restore_work_registers(&p);
2263#ifdef CONFIG_CPU_MICROMIPS 2269#ifdef CONFIG_CPU_MICROMIPS
2264 if ((unsigned long)tlb_do_page_fault_0 & 1) { 2270 if ((unsigned long)tlb_do_page_fault_0 & 1) {
@@ -2313,6 +2319,8 @@ static void build_r4000_tlb_store_handler(void)
2313#endif 2319#endif
2314 2320
2315 uasm_l_nopage_tlbs(&l, p); 2321 uasm_l_nopage_tlbs(&l, p);
2322 if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
2323 uasm_i_sync(&p, 0);
2316 build_restore_work_registers(&p); 2324 build_restore_work_registers(&p);
2317#ifdef CONFIG_CPU_MICROMIPS 2325#ifdef CONFIG_CPU_MICROMIPS
2318 if ((unsigned long)tlb_do_page_fault_1 & 1) { 2326 if ((unsigned long)tlb_do_page_fault_1 & 1) {
@@ -2368,6 +2376,8 @@ static void build_r4000_tlb_modify_handler(void)
2368#endif 2376#endif
2369 2377
2370 uasm_l_nopage_tlbm(&l, p); 2378 uasm_l_nopage_tlbm(&l, p);
2379 if (IS_ENABLED(CONFIG_CPU_LOONGSON3_WORKAROUNDS))
2380 uasm_i_sync(&p, 0);
2371 build_restore_work_registers(&p); 2381 build_restore_work_registers(&p);
2372#ifdef CONFIG_CPU_MICROMIPS 2382#ifdef CONFIG_CPU_MICROMIPS
2373 if ((unsigned long)tlb_do_page_fault_1 & 1) { 2383 if ((unsigned long)tlb_do_page_fault_1 & 1) {