powerpc/mm/radix: Invalidate ERAT on tlbiel for POWER9 DD1
PATCH v3 1/1 powerpc/mm/radix: Invalidate ERAT on tlbiel for POWER9 DD1
On POWER9 DD1, when we do a local TLB invalidate we also need to explicitly invalidate the ERAT.
Signed-off-by Michael Neuling <[email protected]>
---
v3:
- Now with added bike shedding
v2:
- Remove unnecessary isyncs
--- arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/mm/tlb-radix.c | 4 ++++ 2 files changed, 5 insertions(+)
arch/powerpc/include/asm/ppc-opcode.h +1 -0
@@ -460,5 +460,6 @@#define PPC_SLBIA (IH ) stringify_in_c(.long PPC_INST_SLBIA | \ ((IH & 0x7) << 21)) +#define PPC_INVALIDATE_ERAT PPC_SLBIA(7)#endif /* _ASM_POWERPC_PPC_OPCODE_H */
arch/powerpc/mm/tlb-radix.c +4 -0
@@ -50,6 +50,8 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)for (set =0 ; set <POWER9_TLB_SETS_RADIX ; set++) {__tlbiel_pid (pid, set, ric); } +if (cpu_has_feature (CPU_FTR_POWER9_DD1 )) + asm volatile(PPC_INVALIDATE_ERAT : : :"memory");return ; }
@@ -83,6 +85,8 @@ static inline void _tlbiel_va(unsigned long va, unsigned long pid, asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory"); asm volatile("ptesync": : :"memory"); +if (cpu_has_feature (CPU_FTR_POWER9_DD1 )) + asm volatile(PPC_INVALIDATE_ERAT : : :"memory"); } static inline void _tlbie_va(unsigned long va, unsigned long pid,
Signature · 1 line
2.9.3
Michael Ellerman
AppliedQuoted 4 lines · Michael Neuling
On POWER9 DD1, when we do a local TLB invalidate we also need to explicitly invalidate the ERAT.
Signed-off-by Michael Neuling <[email protected]>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/96ed1fe511a8b4948e53f3bad431d8
cheers