Skip to contentSkip to conversation

Patch "powerpc/powernv/npu: Move tlb flush before launching ATSD" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Sep 22, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

powerpc/powernv/npu: Move tlb flush before launching ATSD

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
powerpc-powernv-npu-move-tlb-flush-before-launching-atsd.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From bab9f954aaf352127725a9b7920226abdb65b604 Mon Sep 17 00:00:00 2001

From: Alistair Popple <[email protected]>
Date: Fri, 11 Aug 2017 16:22:56 +1000
Subject: powerpc/powernv/npu: Move tlb flush before launching ATSD

From: Alistair Popple <[email protected]>

commit bab9f954aaf352127725a9b7920226abdb65b604 upstream.

The nest MMU tlb flush needs to happen before the GPU translation shootdown is launched to avoid the GPU refilling its tlb with stale nmmu translations prior to the nmmu flush completing.

Fixes 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2")
---
 arch/powerpc/platforms/powernv/npu-dma.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/platforms/powernv/npu-dma.c +6 -6
@@ -546,6 +546,12 @@ static void mmio_invalidate(struct npu_c
 	unsigned long pid = npu_context->mm->context.id;
 
 	/*
+	 * Unfortunately the nest mmu does not support flushing specific
+	 * addresses so we have to flush the whole mm.
+	 */
+	flush_tlb_mm(npu_context->mm);
+
+	/*
 	 * Loop over all the NPUs this process is active on and launch
 	 * an invalidate.
 	 */
@@ -576,12 +582,6 @@ static void mmio_invalidate(struct npu_c
 		}
 	}
 
-	/*
-	 * Unfortunately the nest mmu does not support flushing specific
-	 * addresses so we have to flush the whole mm.
-	 */
-	flush_tlb_mm(npu_context->mm);
-
 	mmio_invalidate_wait(mmio_atsd_reg, flush);
 	if (flush)
 		/* Wait for the flush to complete */

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/powerpc-powernv-npu-move-tlb-flush-before-launching-atsd.patch