diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-02-05 21:05:16 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-08 22:54:33 -0500 |
commit | 90c1e3c2fafec57fcb55b5d69bcf293b1a5fc8b3 (patch) | |
tree | ea2bf611c6112a0fe03d1277ab62cbfc51cded92 | |
parent | d7df2443cd5f67fc6ee7c05a88e4996e8177f91b (diff) |
powerpc/mm/radix: Update ERAT flushes when invalidating TLB
Three tiny changes to the ERAT flushing logic: First don't make
it depend on DD1. It hasn't been decided yet but we might run
DD2 in a mode that also requires explicit flushes for performance
reasons so make it unconditional. We also add a missing isync, and
finally remove the flush from _tlbiel_va as it is only necessary
for congruence-class invalidations (PID, LPID and full TLB), not
targetted invalidations.
Fixes: 96ed1fe511a8 ("powerpc/mm/radix: Invalidate ERAT on tlbiel for POWER9 DD1")
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/mm/tlb-radix.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index 61b79119065f..952713d6cf04 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c | |||
@@ -50,9 +50,7 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) | |||
50 | for (set = 0; set < POWER9_TLB_SETS_RADIX ; set++) { | 50 | for (set = 0; set < POWER9_TLB_SETS_RADIX ; set++) { |
51 | __tlbiel_pid(pid, set, ric); | 51 | __tlbiel_pid(pid, set, ric); |
52 | } | 52 | } |
53 | if (cpu_has_feature(CPU_FTR_POWER9_DD1)) | 53 | asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory"); |
54 | asm volatile(PPC_INVALIDATE_ERAT : : :"memory"); | ||
55 | return; | ||
56 | } | 54 | } |
57 | 55 | ||
58 | static inline void _tlbie_pid(unsigned long pid, unsigned long ric) | 56 | static inline void _tlbie_pid(unsigned long pid, unsigned long ric) |
@@ -85,8 +83,6 @@ static inline void _tlbiel_va(unsigned long va, unsigned long pid, | |||
85 | asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) | 83 | asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) |
86 | : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory"); | 84 | : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory"); |
87 | asm volatile("ptesync": : :"memory"); | 85 | asm volatile("ptesync": : :"memory"); |
88 | if (cpu_has_feature(CPU_FTR_POWER9_DD1)) | ||
89 | asm volatile(PPC_INVALIDATE_ERAT : : :"memory"); | ||
90 | } | 86 | } |
91 | 87 | ||
92 | static inline void _tlbie_va(unsigned long va, unsigned long pid, | 88 | static inline void _tlbie_va(unsigned long va, unsigned long pid, |