]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD
authorAlistair Popple <alistair@popple.id.au>
Thu, 29 Jun 2017 16:40:12 +0000 (13:40 -0300)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 5 Jul 2017 16:36:01 +0000 (11:36 -0500)
commitc47ea2bc69b0342be5f3dddd4032dbbecb13aca2
tree18bbccc5c36d6b2c43f30443e9623feeb051c114
parent90cba95ee4b44b2cee08f0d28c59bec3405187d2
powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD

BugLink: https://bugs.launchpad.net/bugs/1701272
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>
(cherry picked from commit bbd5ff50afffcf4a01d05367524736c57607a478)
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/platforms/powernv/npu-dma.c