Re: [PATCH 03/13] PCI: quirk dma_func_alias for Ricoh devices

2014-05-09 Thread Alex Williamson
On Sat, 2014-05-10 at 12:46 +0800, Andrew Cooks wrote: > Hi Alex > > On Sat, May 3, 2014 at 1:15 PM, Alex Williamson > wrote: > > On Sat, 2014-05-03 at 10:29 +0800, Andrew Cooks wrote: > >> Hi Alex > >> > >> On Fri, May 2, 2014 at 12:27 AM, Alex Williamson > >> wrote: > >> > The existing quirk f

Re: [PATCH 03/13] PCI: quirk dma_func_alias for Ricoh devices

2014-05-09 Thread Andrew Cooks
Hi Alex On Sat, May 3, 2014 at 1:15 PM, Alex Williamson wrote: > On Sat, 2014-05-03 at 10:29 +0800, Andrew Cooks wrote: >> Hi Alex >> >> On Fri, May 2, 2014 at 12:27 AM, Alex Williamson >> wrote: >> > The existing quirk for these devices doesn't really solve the problem, >> > re-implement it usi

[PATCH v2] PCI: Introduce new device binding path using pci_dev.driver_override

2014-05-09 Thread Alex Williamson
The driver_override field allows us to specify the driver for a device rather than relying on the driver to provide a positive match of the device. This shortcuts the existing process of looking up the vendor and device ID, adding them to the driver new_id, binding the device, then removing the ID

[PATCH v2 11/15] iommu/intel: Update to use PCI DMA aliases

2014-05-09 Thread Alex Williamson
VT-d code currently makes use of pci_find_upstream_pcie_bridge() in order to find the topology based alias of a device. This function has a few problems. First, it doesn't check the entire alias path of the device to the root bus, therefore if a PCIe device is masked upstream, the wrong result is

[PATCH v2 09/15] iommu/amd: Update to use PCI DMA aliases

2014-05-09 Thread Alex Williamson
AMD-Vi already has a concept of an alias provided via the IVRS table. This alias only handles topology based aliases, such as PCIe-to-PCI bridges. When such an alias is present, we continue to use it. When a platform alias is not present, we can now add a check of the device dma_func_alias to cre

[PATCH v2 14/15] PCI: Remove pci_find_upstream_pcie_bridge()

2014-05-09 Thread Alex Williamson
It's broken and has no users. Signed-off-by: Alex Williamson --- drivers/pci/search.c | 35 --- include/linux/pci.h | 11 --- 2 files changed, 46 deletions(-) diff --git a/drivers/pci/search.c b/drivers/pci/search.c index aea2443..473c6e8 100644 ---

[PATCH v2 13/15] iommu: Remove pci.h

2014-05-09 Thread Alex Williamson
The single helper here no longer has any users. Signed-off-by: Alex Williamson Cc: Joerg Roedel --- drivers/iommu/pci.h | 29 - 1 file changed, 29 deletions(-) delete mode 100644 drivers/iommu/pci.h diff --git a/drivers/iommu/pci.h b/drivers/iommu/pci.h deleted f

[PATCH v2 15/15] PCI: Remove pci_get_dma_source()

2014-05-09 Thread Alex Williamson
It has no users; replaced by dma_func_alias. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 51 -- include/linux/pci.h |5 - 2 files changed, 56 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index a10a

[PATCH v2 08/15] iommu/amd: Use pci_find_dma_isolation_root() for IOMMU groups

2014-05-09 Thread Alex Williamson
The IVRS tables provides aliases, but not to the extent now provided by PCI core with DMA alias support and pci_find_dma_isolation_root(). The expectation is that the kernel and IVRS will produce the same result for topology based aliases while the kernel will also include device specific DMA quirk

[PATCH v2 07/15] PCI: Consolidate isolation domain code

2014-05-09 Thread Alex Williamson
Each of the IOMMU drivers supporting IOMMU groups has their own implementation of an algorithm to find the base device for an IOMMU group. This N:1 function takes into account visibility of a PCI device on the bus using DMA aliases, as well as the isolation of devices using ACS. Since these are a

[PATCH v2 12/15] iommu/fsl: Use pci_find_dma_isolation_root() for IOMMU groups

2014-05-09 Thread Alex Williamson
Drop custom code and use PCI provided isolation root support. Signed-off-by: Alex Williamson Cc: Varun Sethi --- drivers/iommu/fsl_pamu_domain.c | 67 ++- 1 file changed, 3 insertions(+), 64 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drive

[PATCH v2 10/15] iommu/intel: Use pci_find_dma_isolation_root() for IOMMU groups

2014-05-09 Thread Alex Williamson
Drop custom code that attempts to do the exact same thing and use PCI provided isolation root support. Existing IOMMU group laytout should not change. Signed-off-by: Alex Williamson Cc: David Woodhouse --- drivers/iommu/intel-iommu.c | 71 +-- 1 file c

[PATCH v2 04/15] PCI: quirk dma_func_alias for Marvell devices

2014-05-09 Thread Alex Williamson
Several Marvell devices and a JMicron device have a similar DMA requester ID problem to Ricoh, except they use function 1 as the PCIe requester ID. Add a quirk for these to populate the DMA function alias bitmap. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 34 +++

[PATCH v2 00/15] PCI/iommu: Fix DMA alias problems

2014-05-09 Thread Alex Williamson
v2: - Several new Marvell controllers added to quirks. There's been a lot of success reported with this series in https://bugzilla.kernel.org/show_bug.cgi?id=42679 - Add quirk for ASMedia and Tundra PCIe-to-PCI bridges that do not expose a PCIe capability. These have been shown to use

[PATCH v2 03/15] PCI: quirk dma_func_alias for Ricoh devices

2014-05-09 Thread Alex Williamson
The existing quirk for these devices doesn't really solve the problem, re-implement it using the DMA alias iterator. We'll come back later and remove the existing quirk and dma_source interface. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 16 1 file changed, 16

[PATCH v2 02/15] PCI: quirk pci_for_each_dma_alias()

2014-05-09 Thread Alex Williamson
There are a few broken devices that use the requester ID of a different function in the slot for their DMA. To handle these, add a bitmap to struct pci_dev (using an alignment gap) that quirks can populate. As we iterate over the device and bus DMA aliases, also iterate over any bits in the map.

[PATCH v2 06/15] PCI: Add quirks for ASMedia and Tundra bridges

2014-05-09 Thread Alex Williamson
The quirk is intended to be extremely generic, but we only apply it to known offending devices. Signed-off-by: Alex Williamson --- drivers/pci/quirks.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 63b8245..a10a68

[PATCH v2 01/15] PCI: Add DMA alias iterator

2014-05-09 Thread Alex Williamson
In a mixed PCI/PCI-X/PCI-e topology, bridges can take ownership of transactions, replacing the original requester ID with their own. Sometimes we just want to know the resulting device or resulting alias, sometimes we want each step in the chain. This iterator allows either usage. When an endpoin

[PATCH v2 05/15] PCI: Quirk pci_for_each_dma_alias() for bridges

2014-05-09 Thread Alex Williamson
Several PCIe-to-PCI bridges fail to provide a PCIe capability, causing us to handle them as conventional PCI devices. In some cases, this may be correct, in others it's not. Add a dev_flag bit to identify devices to be handled as standard PCIe-to-PCI bridges. Signed-off-by: Alex Williamson ---

Re: [PATCH v12 18/31] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-05-09 Thread Cho KyongHo
On Tue, 06 May 2014 20:05:14 +0200, Tomasz Figa wrote: > On 27.04.2014 09:37, Shaik Ameer Basha wrote: > > From: Cho KyongHo > > > > Some master device descriptor like fimc-is which is an abstraction > > of very complex H/W may have multiple System MMUs. For those devices, > > the design of the li