[PATCH v2 1/9] iommu/io-pgtable-arm: Allow appropriate DMA API use

2015-07-29 Thread Robin Murphy
Currently, users of the LPAE page table code are (ab)using dma_map_page() as a means to flush page table updates for non-coherent IOMMUs. Since from the CPU's point of view, creating IOMMU page tables *is* passing DMA buffers to a device (the IOMMU's page table walker), there's little reason not to

[PATCH v2 5/9] iommu/ipmmu-vmsa: Clean up DMA API usage

2015-07-29 Thread Robin Murphy
With the correct DMA API calls now integrated into the io-pgtable code, let that handle the flushing of non-coherent page table updates. Signed-off-by: Robin Murphy --- drivers/iommu/ipmmu-vmsa.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/iom

[PATCH v2 3/9] iommu/arm-smmu: Clean up DMA API usage

2015-07-29 Thread Robin Murphy
With the correct DMA API calls now integrated into the io-pgtable code, let that handle the flushing of non-coherent page table updates. Signed-off-by: Robin Murphy --- drivers/iommu/arm-smmu.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/io

[PATCH v2 4/9] iommu/arm-smmu-v3: Clean up DMA API usage

2015-07-29 Thread Robin Murphy
With the correct DMA API calls now integrated into the io-pgtable code, let that handle the flushing of non-coherent page table updates. Signed-off-by: Robin Murphy --- drivers/iommu/arm-smmu-v3.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/iom

[PATCH v2 8/9] iommu/arm-smmu-v3: Remove arm_smmu_flush_pgtable()

2015-07-29 Thread Robin Murphy
With the io-pgtable code now enforcing its own appropriate sync points, the vestigial flush_pgtable callback becomes entirely redundant, so remove it altogether. Signed-off-by: Robin Murphy --- drivers/iommu/arm-smmu-v3.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/iom

[PATCH v2 6/9] iommu/io-pgtable-arm: Centralise sync points

2015-07-29 Thread Robin Murphy
With all current users now opted in to DMA API operations, make the iommu_dev pointer mandatory, rendering the flush_pgtable callback redundant for cache maintenance. However, since the DMA calls could be nops in the case of a coherent IOMMU, we still need to ensure the page table updates are fully

[PATCH v2 7/9] iommu/arm-smmu: Remove arm_smmu_flush_pgtable()

2015-07-29 Thread Robin Murphy
With the io-pgtable code now enforcing its own appropriate sync points, the vestigial flush_pgtable callback becomes entirely redundant, so remove it altogether. Signed-off-by: Robin Murphy --- drivers/iommu/arm-smmu.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/iom

[PATCH v2 2/9] iommu/arm-smmu: Sort out coherency

2015-07-29 Thread Robin Murphy
Currently, we detect whether the SMMU has coherent page table walk capability from the IDR0.CTTW field, and base our cache maintenance decisions on that. In preparation for fixing the bogus DMA API usage, however, we need to ensure that the DMA API agrees about this, which necessitates deferring to

[PATCH v2 9/9] iommu/io-pgtable: Remove flush_pgtable callback

2015-07-29 Thread Robin Murphy
With the users fully converted to DMA API operations, it's dead, Jim. Signed-off-by: Robin Murphy --- drivers/iommu/io-pgtable-arm.c | 6 -- drivers/iommu/io-pgtable.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c in

Re: Since Linux 4.1: A lot of AMD-Vi IO_PAGE_FAULTs

2015-07-29 Thread Andreas Hartmann
Hi Jörg, On 07/29/2015 at 05:22 PM, Joerg Roedel wrote: > Hi Andreas, > > On Fri, Jul 24, 2015 at 07:59:07PM +0200, Andreas Hartmann wrote: >> New information: During testing, I now realized that Linux 4.0.9 shows >> the same problem ... . I'm now testing 3.19.4. > > Have you seen the issue on 3

Re: [PATCH v2 00/11] PCI: Fix ATS deadlock

2015-07-29 Thread Bjorn Helgaas
On Mon, Jul 20, 2015 at 07:13:49PM -0500, Bjorn Helgaas wrote: > Gregor reported a deadlock [1] when enabling a VF that supports ATS. > This series is intended to fix that. The second patch should be enough to > fix the deadlock; the rest are simplification and cleanup. > > These are based on v4.

Re: Since Linux 4.1: A lot of AMD-Vi IO_PAGE_FAULTs

2015-07-29 Thread Joerg Roedel
Hi Andreas, On Fri, Jul 24, 2015 at 07:59:07PM +0200, Andreas Hartmann wrote: > New information: During testing, I now realized that Linux 4.0.9 shows > the same problem ... . I'm now testing 3.19.4. Have you seen the issue on 3.19 too or hasn't it happened there at all yet? The question is where

Re: [PATCH v3 5/6] iommu/mediatek: Add mt8173 IOMMU driver

2015-07-29 Thread Will Deacon
On Wed, Jul 29, 2015 at 06:41:31AM +0100, Yong Wu wrote: > On Mon, 2015-07-27 at 16:49 +0100, Robin Murphy wrote: > > On 27/07/15 16:31, Russell King - ARM Linux wrote: > > > On Mon, Jul 27, 2015 at 02:23:26PM +0100, Robin Murphy wrote: > > >> On 16/07/15 10:04, Yong Wu wrote: > > >>> This patch ad

Re: [PATCH v3 6/6] dts: mt8173: Add iommu/smi nodes for mt8173

2015-07-29 Thread Yong Wu
On Thu, 2015-07-23 at 22:40 +0800, Daniel Kurtz wrote: > Hi Yong, > > On Thu, Jul 16, 2015 at 5:04 PM, Yong Wu wrote: > > > > This patch add the iommu/larbs nodes for mt8173 > > To what tree does this apply? > Please rebase these patches (especially this one) on an Matthias' > current v4.2-next/