Skip to content

Commit 96ed1fe

Browse files
mikeympe
authored andcommitted
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 <mikey@neuling.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent c0a3601 commit 96ed1fe

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

arch/powerpc/include/asm/ppc-opcode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,5 +460,6 @@
460460

461461
#define PPC_SLBIA(IH) stringify_in_c(.long PPC_INST_SLBIA | \
462462
((IH & 0x7) << 21))
463+
#define PPC_INVALIDATE_ERAT PPC_SLBIA(7)
463464

464465
#endif /* _ASM_POWERPC_PPC_OPCODE_H */

arch/powerpc/mm/tlb-radix.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
5050
for (set = 0; set < POWER9_TLB_SETS_RADIX ; set++) {
5151
__tlbiel_pid(pid, set, ric);
5252
}
53+
if (cpu_has_feature(CPU_FTR_POWER9_DD1))
54+
asm volatile(PPC_INVALIDATE_ERAT : : :"memory");
5355
return;
5456
}
5557

@@ -83,6 +85,8 @@ static inline void _tlbiel_va(unsigned long va, unsigned long pid,
8385
asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1)
8486
: : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory");
8587
asm volatile("ptesync": : :"memory");
88+
if (cpu_has_feature(CPU_FTR_POWER9_DD1))
89+
asm volatile(PPC_INVALIDATE_ERAT : : :"memory");
8690
}
8791

8892
static inline void _tlbie_va(unsigned long va, unsigned long pid,

0 commit comments

Comments
 (0)