linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] powerpc/mm/radix: Don't iterate all sets when flushing the PWC
@ 2017-07-14  1:52 Benjamin Herrenschmidt
  2017-07-14  1:52 ` [PATCH 2/4] powerpc/mm/radix: Improve TLB/PWC flushes Benjamin Herrenschmidt
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Benjamin Herrenschmidt @ 2017-07-14  1:52 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: aneesh.kumar, npiggin, Benjamin Herrenschmidt

The PWC flush only needs a single set call, just like the
full (RIC=2) flush.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/mm/tlb-radix.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
index 02e7140..5403419 100644
--- a/arch/powerpc/mm/tlb-radix.c
+++ b/arch/powerpc/mm/tlb-radix.c
@@ -52,12 +52,15 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)
 	 */
 	__tlbiel_pid(pid, 0, ric);
 
-	if (ric == RIC_FLUSH_ALL)
-		/* For the remaining sets, just flush the TLB */
-		ric = RIC_FLUSH_TLB;
+	/* For PWC, only one flush is needed */
+	if (ric == RIC_FLUSH_PWC) {
+		asm volatile("ptesync": : :"memory");
+		return;
+	}
 
+	/* For the remaining sets, just flush the TLB */
 	for (set = 1; set < POWER9_TLB_SETS_RADIX ; set++)
-		__tlbiel_pid(pid, set, ric);
+		__tlbiel_pid(pid, set, RIC_FLUSH_TLB);
 
 	asm volatile("ptesync": : :"memory");
 	asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory");
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-07-19  3:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14  1:52 [PATCH 1/4] powerpc/mm/radix: Don't iterate all sets when flushing the PWC Benjamin Herrenschmidt
2017-07-14  1:52 ` [PATCH 2/4] powerpc/mm/radix: Improve TLB/PWC flushes Benjamin Herrenschmidt
2017-07-14  1:52 ` [PATCH 3/4] powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range Benjamin Herrenschmidt
2017-07-14  5:44   ` Aneesh Kumar K.V
2017-07-14  6:22     ` Benjamin Herrenschmidt
2017-07-17 12:12   ` kbuild test robot
2017-07-14  1:52 ` [PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM Benjamin Herrenschmidt
2017-07-14  5:51   ` Aneesh Kumar K.V
2017-07-14  6:25     ` Benjamin Herrenschmidt
2017-07-14  6:49     ` [PATCH v2] " Benjamin Herrenschmidt
2017-07-17  5:10       ` Aneesh Kumar K.V
2017-07-19  2:29   ` [PATCH 4/4] " Balbir Singh
2017-07-19  3:54     ` Benjamin Herrenschmidt
2017-07-14  5:41 ` [PATCH 1/4] powerpc/mm/radix: Don't iterate all sets when flushing the PWC Aneesh Kumar K.V
2017-07-14  6:21   ` Benjamin Herrenschmidt
2017-07-14  7:03     ` Aneesh Kumar K.V
2017-07-14  7:21       ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).