diff options
Diffstat (limited to 'arch/mips/mm/tlbex.c')
-rw-r--r-- | arch/mips/mm/tlbex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index a08dd53a1cc5..b5f228e7eae6 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -1062,6 +1062,7 @@ static void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep) | |||
1062 | struct mips_huge_tlb_info { | 1062 | struct mips_huge_tlb_info { |
1063 | int huge_pte; | 1063 | int huge_pte; |
1064 | int restore_scratch; | 1064 | int restore_scratch; |
1065 | bool need_reload_pte; | ||
1065 | }; | 1066 | }; |
1066 | 1067 | ||
1067 | static struct mips_huge_tlb_info | 1068 | static struct mips_huge_tlb_info |
@@ -1076,6 +1077,7 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l, | |||
1076 | 1077 | ||
1077 | rv.huge_pte = scratch; | 1078 | rv.huge_pte = scratch; |
1078 | rv.restore_scratch = 0; | 1079 | rv.restore_scratch = 0; |
1080 | rv.need_reload_pte = false; | ||
1079 | 1081 | ||
1080 | if (check_for_high_segbits) { | 1082 | if (check_for_high_segbits) { |
1081 | UASM_i_MFC0(p, tmp, C0_BADVADDR); | 1083 | UASM_i_MFC0(p, tmp, C0_BADVADDR); |
@@ -1264,6 +1266,7 @@ static void build_r4000_tlb_refill_handler(void) | |||
1264 | } else { | 1266 | } else { |
1265 | htlb_info.huge_pte = K0; | 1267 | htlb_info.huge_pte = K0; |
1266 | htlb_info.restore_scratch = 0; | 1268 | htlb_info.restore_scratch = 0; |
1269 | htlb_info.need_reload_pte = true; | ||
1267 | vmalloc_mode = refill_noscratch; | 1270 | vmalloc_mode = refill_noscratch; |
1268 | /* | 1271 | /* |
1269 | * create the plain linear handler | 1272 | * create the plain linear handler |
@@ -1300,7 +1303,8 @@ static void build_r4000_tlb_refill_handler(void) | |||
1300 | } | 1303 | } |
1301 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT | 1304 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT |
1302 | uasm_l_tlb_huge_update(&l, p); | 1305 | uasm_l_tlb_huge_update(&l, p); |
1303 | UASM_i_LW(&p, K0, 0, K1); | 1306 | if (htlb_info.need_reload_pte) |
1307 | UASM_i_LW(&p, htlb_info.huge_pte, 0, K1); | ||
1304 | build_huge_update_entries(&p, htlb_info.huge_pte, K1); | 1308 | build_huge_update_entries(&p, htlb_info.huge_pte, K1); |
1305 | build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random, | 1309 | build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random, |
1306 | htlb_info.restore_scratch); | 1310 | htlb_info.restore_scratch); |