|
@@ -151,6 +151,17 @@ static inline void __tlbie_va(unsigned long va, unsigned long pid,
|
|
|
trace_tlbie(0, 0, rb, rs, ric, prs, r);
|
|
|
}
|
|
|
|
|
|
+static inline void fixup_tlbie(void)
|
|
|
+{
|
|
|
+ unsigned long pid = 0;
|
|
|
+ unsigned long va = ((1UL << 52) - 1);
|
|
|
+
|
|
|
+ if (cpu_has_feature(CPU_FTR_P9_TLBIE_BUG)) {
|
|
|
+ asm volatile("ptesync": : :"memory");
|
|
|
+ __tlbie_va(va, pid, mmu_get_ap(MMU_PAGE_64K), RIC_FLUSH_TLB);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* We use 128 set in radix mode and 256 set in hpt mode.
|
|
|
*/
|
|
@@ -200,6 +211,7 @@ static inline void _tlbie_pid(unsigned long pid, unsigned long ric)
|
|
|
default:
|
|
|
__tlbie_pid(pid, RIC_FLUSH_ALL);
|
|
|
}
|
|
|
+ fixup_tlbie();
|
|
|
asm volatile("eieio; tlbsync; ptesync": : :"memory");
|
|
|
}
|
|
|
|
|
@@ -253,6 +265,7 @@ static inline void _tlbie_va(unsigned long va, unsigned long pid,
|
|
|
|
|
|
asm volatile("ptesync": : :"memory");
|
|
|
__tlbie_va(va, pid, ap, ric);
|
|
|
+ fixup_tlbie();
|
|
|
asm volatile("eieio; tlbsync; ptesync": : :"memory");
|
|
|
}
|
|
|
|
|
@@ -264,6 +277,7 @@ static inline void _tlbie_va_range(unsigned long start, unsigned long end,
|
|
|
if (also_pwc)
|
|
|
__tlbie_pid(pid, RIC_FLUSH_PWC);
|
|
|
__tlbie_va_range(start, end, pid, page_size, psize);
|
|
|
+ fixup_tlbie();
|
|
|
asm volatile("eieio; tlbsync; ptesync": : :"memory");
|
|
|
}
|
|
|
|
|
@@ -498,6 +512,7 @@ void radix__flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
|
|
if (hflush)
|
|
|
__tlbie_va_range(hstart, hend, pid,
|
|
|
HPAGE_PMD_SIZE, MMU_PAGE_2M);
|
|
|
+ fixup_tlbie();
|
|
|
asm volatile("eieio; tlbsync; ptesync": : :"memory");
|
|
|
}
|
|
|
}
|