]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: powerpc/mm/radix: Remove unnecessary ptesync
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 10 Apr 2017 13:23:46 +0000 (10:23 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:08 +0000 (10:11 +0200)
BugLink: https://bugs.launchpad.net/bugs/1681429
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 <benh@kernel.crashing.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/mm/tlb-radix.c

index 74f17e3c7cbea955889a2facbf339def65e72a42..93c9d8080b2ab0fb7a871ee896a0fd90688cc111 100644 (file)
@@ -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");
 }