]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/powernv/npu: Rework TCE Kill handling
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 29 Apr 2016 08:55:23 +0000 (18:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 May 2016 11:54:31 +0000 (21:54 +1000)
commit85674868cecebdf6eb7239ecf9c32b6273208d03
treead73c4a0aadc9b2a212642a002344b46baf9397c
parentb575c731fe58c1ecb1247c6a334ba6c7b4c0b480
powerpc/powernv/npu: Rework TCE Kill handling

The pnv_ioda_pe struct keeps an array of peers. At the moment it is only
used to link GPU and NPU for 2 purposes:

1. Access NPU quickly when configuring DMA for GPU - this was addressed
in the previos patch by removing use of it as DMA setup is not what
the kernel would constantly do.

2. Invalidate TCE cache for NPU when it is invalidated for GPU.
GPU and NPU are in different PE. There is already a mechanism to
attach multiple iommu_table_group to the same iommu_table (used for VFIO),
we can reuse it here so does this patch.

This gets rid of peers[] array and PNV_IODA_PE_PEER flag as they are
not needed anymore.

While we are here, add TCE cache invalidation after enabling bypass.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-By: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/npu-dma.c
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.h