]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD
authorAlistair Popple <alistair@popple.id.au>
Tue, 20 Jun 2017 08:37:28 +0000 (18:37 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Jun 2017 11:21:08 +0000 (21:21 +1000)
commit992d9733f31c3ca5ba9de33a1928844d55a73e42
treebd2b3428a18f220daf30ba25a837f838e3070230
parent433ac60676dde68c00ab749cb5d831f92caec933
powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD

NPU2 requires an extra explicit flush to an active GPU PID when
sending address translation shoot downs (ATSDs) to reliably flush the
GPU TLB. This patch adds just such a flush at the end of each sequence
of ATSDs.

We can safely use PID 0 which is always reserved and active on the
GPU. PID 0 is only used for init_mm which will never be a user mm on
the GPU. To enforce this we add a check in pnv_npu2_init_context()
just in case someone tries to use PID 0 on the GPU.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
[mpe: Use true/false for bool literals]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/npu-dma.c