Re: [PATCH] iommu/vt-d: Avoid write-tearing on PTE clear

2016-06-03 Thread Nadav Amit
Ping? Nadav Amit wrote: > When a PTE is cleared, the write may be teared or perform by multiple > writes. In addition, in 32-bit kernel, writes are currently performed > using a single 64-bit write, which does not guarantee order. > > The byte-code right now does not seem to

[PATCH v2 6/7] iommu/arm-smmu: Finish off SMMUv3 default domain support

2016-06-03 Thread Robin Murphy
The driver's current reliance on attaching/detaching an entire group for the first device it sees is at odds with the IOMMU core's initial construction of a group by adding each device and attaching it to the default domain in turn. As it turns out, we can happily do away with the whole palaver by

[PATCH v2 7/7] iommu/arm-smmu: Support non-PCI devices with SMMUv3

2016-06-03 Thread Robin Murphy
With the device <-> stream ID relationship suitably abstracted and of_xlate() hooked up, we no longer have any PCI-specifics in play, so adding support for the simpler kinds of platform device (a single unique stream ID each) becomes trivial; let's do it! Signed-off-by: Robin Murphy

[PATCH v2 5/7] iommu/arm-smmu: Implement of_xlate() for SMMUv3

2016-06-03 Thread Robin Murphy
Now that we can properly describe the mapping between PCI RIDs and stream IDs via "iommu-map", and have it fed it to the driver automatically via of_xlate(), rework the SMMUv3 driver to benefit from that. Initially, this just gets rid of the misuse of the "iommus" binding without changing the

[PATCH v2 4/7] iommu/of: Handle iommu-map property for PCI

2016-06-03 Thread Robin Murphy
Now that we have a way to pick up the RID translation and target IOMMU, hook up of_iommu_configure() to bring PCI devices into the of_xlate mechanism and allow them IOMMU-backed DMA ops without the need for driver-specific handling. CC: Rob Herring CC: Frank Rowand

[PATCH v2 3/7] of/irq: Break out msi-map lookup (again)

2016-06-03 Thread Robin Murphy
The PCI msi-map code is already doing double-duty translating IDs and retrieving MSI parents, which unsurprisingly is the same functionality we need for the identically-formatted PCI iommu-map property. Drag the core parsing routine up yet another layer into the general OF-PCI code, and further

[PATCH v2 1/7] iommu/of: Respect disabled IOMMUs

2016-06-03 Thread Robin Murphy
If an IOMMU node is present in the DT but marked as disabled, we should avoid trying to do anything with it. We currently sort-of get away with this by virtue of a disabled device probably not having called of_iommu_set_ops(), but that is hardly safe to rely upon in general, and either way we

[PATCH v2 0/7] Generic DT bindings for PCI IOMMUs and ARM SMMUv3

2016-06-03 Thread Robin Murphy
Hi all, Compared to v1[1] this is more or less a repost of the core parts, although patch 1 is new. I still need to take the horrible SMMUv2 code out back and shoot it (there turned out to be some subtle nasties in v1), so in the meantime I picked up the SMMUv3 ticket to fill in as it was rather

[PATCH v2 2/7] Docs: dt: add PCI IOMMU map bindings

2016-06-03 Thread Robin Murphy
From: Mark Rutland The existing IOMMU bindings are able to specify the relationship between masters and IOMMUs, but they are insufficient for describing the general case of hotpluggable busses such as PCI where the set of masters is not known until runtime, and the

Re: [PATCH v2 3/3] iommu: convert DT component matching to component_match_add_release()

2016-06-03 Thread Matthias Brugger
On 03/06/16 16:21, Russell King wrote: Convert DT component matching to use component_match_add_release(). Signed-off-by: Russell King Reviewed-by: Matthias Brugger --- drivers/iommu/mtk_iommu.c | 14 ++ 1 file changed,

[PATCH v2 3/3] iommu: convert DT component matching to component_match_add_release()

2016-06-03 Thread Russell King
Convert DT component matching to use component_match_add_release(). Signed-off-by: Russell King --- drivers/iommu/mtk_iommu.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c

Re: [PATCH] iommu: convert DT component matching to component_match_add_release()

2016-06-03 Thread Matthias Brugger
On 03/06/16 09:58, Russell King wrote: Convert DT component matching to use component_match_add_release(). Signed-off-by: Russell King --- Reviewed-by: Matthias Brugger drivers/iommu/mtk_iommu.c | 13 ++--- 1 file changed,

[PATCH] iommu: convert DT component matching to component_match_add_release()

2016-06-03 Thread Russell King
Convert DT component matching to use component_match_add_release(). Signed-off-by: Russell King --- drivers/iommu/mtk_iommu.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c

[PATCH] iommu/arm-smmu: wire up map_sg for arm-smmu-v3

2016-06-03 Thread Will Deacon
From: Jean-Philippe Brucker The map_sg callback is missing from arm_smmu_ops, but is required by iommu.h. Similarly to most other IOMMU drivers, connect it to default_iommu_map_sg. Cc: Signed-off-by: Jean-Philippe Brucker

Re: [PATCH v3 00/06] iommu/ipmmu-vmsa: IPMMU multi-arch update V3

2016-06-03 Thread Geert Uytterhoeven
Hi Magnus, On Thu, Jun 2, 2016 at 5:55 PM, Magnus Damm wrote: > iommu/ipmmu-vmsa: IPMMU multi-arch update V3 > > [PATCH v3 01/06] iommu/ipmmu-vmsa: Remove platform data handling > [PATCH v3 02/06] iommu/ipmmu-vmsa: Rework interrupt code and use bitmap for > context >

Re: [RFC v3 10/45] cris: dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Jesper Nilsson
On Thu, Jun 02, 2016 at 05:39:12PM +0200, Krzysztof Kozlowski wrote: > Split out subsystem specific changes for easier reviews. This will be > squashed with main commit. Acked-by: Jesper Nilsson > Signed-off-by: Krzysztof Kozlowski /^JN -

Re: [RFC v3 01/45] powerpc: dma-mapping: Don't hard-code the value of DMA_ATTR_WEAK_ORDERING

2016-06-03 Thread Krzysztof Kozlowski
On 06/02/2016 05:39 PM, Krzysztof Kozlowski wrote: > Hard-coded value of DMA_ATTR_WEAK_ORDERING is then compared with the > symbol. This will stop matching if the value of symbol is changed (when > switching DMA attributes to unsigned long). > > Signed-off-by: Krzysztof Kozlowski

Re: [RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Krzysztof Kozlowski
On 06/03/2016 09:17 AM, Geert Uytterhoeven wrote: > Hi Krzysztof, > > On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski > wrote: >> --- a/include/linux/dma-mapping.h >> +++ b/include/linux/dma-mapping.h >> @@ -5,13 +5,25 @@ > >> +/** >> + * List of possible attributes

Re: [RFC v3 29/45] m68k: dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Geert Uytterhoeven
On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski wrote: > Split out subsystem specific changes for easier reviews. This will be > squashed with main commit. > > Signed-off-by: Krzysztof Kozlowski Looks good. Acked-by: Geert Uytterhoeven

Re: [RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Geert Uytterhoeven
Hi Krzysztof, On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski wrote: > --- a/include/linux/dma-mapping.h > +++ b/include/linux/dma-mapping.h > @@ -5,13 +5,25 @@ > +/** > + * List of possible attributes associated with a DMA mapping. The semantics > + * of each