From: Ralf Baechle Date: Tue, 16 Oct 2012 23:01:21 +0000 (+0200) Subject: MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fb944c9ba3f4838a64929a1926822e987b4e44c0;p=linux-beck.git MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration. On some CPU the write to pagemask might complete before the TLB write instruction reads from the pagemask register. Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 87b9cfcc30ff..4b9b935a070e 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -320,6 +320,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) tlb_write_random(); else tlb_write_indexed(); + tlbw_use_hazard(); write_c0_pagemask(PM_DEFAULT_MASK); } else #endif