From: Aneesh Kumar K.V Date: Sat, 1 Apr 2017 14:41:48 +0000 (+0530) Subject: powerpc/mm/radix: Remove unnecessary ptesync X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7327e0ba3805470cced2acfa053e795362ee41d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/mm/radix: Remove unnecessary ptesync For a tlbiel with pid, we need to issue tlbiel with set number encoded. We don't need to do ptesync for each of those. Instead we need one for the entire tlbiel pid operation. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Acked-by: Anton Blanchard Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index f3e58bd60d1a..b68b5219cf45 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c @@ -34,10 +34,8 @@ static inline void __tlbiel_pid(unsigned long pid, int set, prs = 1; /* process scoped */ r = 1; /* raidx format */ - asm volatile("ptesync": : :"memory"); asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory"); - asm volatile("ptesync": : :"memory"); } /* @@ -47,9 +45,11 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) { int set; + asm volatile("ptesync": : :"memory"); for (set = 0; set < POWER9_TLB_SETS_RADIX ; set++) { __tlbiel_pid(pid, set, ric); } + asm volatile("ptesync": : :"memory"); asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory"); }