<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/dma-iommu.h, branch v4.20</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.20</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-05-13T13:59:00Z</updated>
<entry>
<title>dma-iommu: Fix compilation when !CONFIG_IOMMU_DMA</title>
<updated>2018-05-13T13:59:00Z</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2018-05-08T12:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a22a3e1e768c309b718f99bd86f9f25a453e0dc'/>
<id>urn:sha1:8a22a3e1e768c309b718f99bd86f9f25a453e0dc</id>
<content type='text'>
Inclusion of include/dma-iommu.h when CONFIG_IOMMU_DMA is not selected
results in the following splat:

In file included from drivers/irqchip/irq-gic-v3-mbi.c:20:0:
./include/linux/dma-iommu.h:95:69: error: unknown type name ‘dma_addr_t’
 static inline int iommu_get_msi_cookie(struct iommu_domain *domain, dma_addr_t base)
                                                                     ^~~~~~~~~~
./include/linux/dma-iommu.h:108:74: warning: ‘struct list_head’ declared inside parameter list will not be visible outside of this definition or declaration
 static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)
                                                                          ^~~~~~~~~
scripts/Makefile.build:312: recipe for target 'drivers/irqchip/irq-gic-v3-mbi.o' failed

Fix it by including linux/types.h.

Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Cc: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lkml.kernel.org/r/20180508121438.11301-5-marc.zyngier@arm.com

</content>
</entry>
<entry>
<title>iommu/dma: Fix function declaration</title>
<updated>2017-05-30T09:25:45Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-05-18T13:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4b1c88984c8ac894c2c411570757bed7fa5f3226'/>
<id>urn:sha1:4b1c88984c8ac894c2c411570757bed7fa5f3226</id>
<content type='text'>
Newly added code in the ipmmu-vmsa driver showed a small mistake
in a header file that can't be included by itself without CONFIG_IOMMU_DMA
enabled:

In file included from drivers/iommu/ipmmu-vmsa.c:13:0:
include/linux/dma-iommu.h:105:94: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]

This adds a forward declaration for 'struct device', similar to how
we treat the other struct types in this case.

Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops")
Fixes: 273df9635385 ("iommu/dma: Make PCI window reservation generic")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next</title>
<updated>2017-05-04T16:06:17Z</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2017-05-04T16:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2c0248d68880fc0e783af1048b3367ee5d4412f0'/>
<id>urn:sha1:2c0248d68880fc0e783af1048b3367ee5d4412f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>iommu: Remove pci.h include from trace/events/iommu.h</title>
<updated>2017-04-28T22:20:49Z</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2017-04-26T13:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=461a6946b1f93f6720577fb06aa78e8cbd9291c9'/>
<id>urn:sha1:461a6946b1f93f6720577fb06aa78e8cbd9291c9</id>
<content type='text'>
The include file does not need any PCI specifics, so remove
that include. Also fix the places that relied on it.

Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/dma: Make PCI window reservation generic</title>
<updated>2017-03-22T15:18:59Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2017-03-16T17:00:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=273df9635385b2156851c7ee49f40658d7bcb29d'/>
<id>urn:sha1:273df9635385b2156851c7ee49f40658d7bcb29d</id>
<content type='text'>
Now that we're applying the IOMMU API reserved regions to our IOVA
domains, we shouldn't need to privately special-case PCI windows, or
indeed anything else which isn't specific to our iommu-dma layer.
However, since those aren't IOMMU-specific either, rather than start
duplicating code into IOMMU drivers let's transform the existing
function into an iommu_get_resv_regions() helper that they can share.

Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>iommu/dma: Remove bogus dma_supported() implementation</title>
<updated>2017-02-06T12:14:10Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2017-02-01T17:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1831bb9403720db6d4c033fe2d6bd0116dd28fe'/>
<id>urn:sha1:a1831bb9403720db6d4c033fe2d6bd0116dd28fe</id>
<content type='text'>
Back when this was first written, dma_supported() was somewhat of a
murky mess, with subtly different interpretations being relied upon in
various places. The "does device X support DMA to address range Y?"
uses assuming Y to be physical addresses, which motivated the current
iommu_dma_supported() implementation and are alluded to in the comment
therein, have since been cleaned up, leaving only the far less ambiguous
"can device X drive address bits Y" usage internal to DMA API mask
setting. As such, there is no reason to keep a slightly misleading
callback which does nothing but duplicate the current default behaviour;
we already constrain IOVA allocations to the iommu_domain aperture where
necessary, so let's leave DMA mask business to architecture-specific
code where it belongs.

Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'iommu/iommu-priv' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/core</title>
<updated>2017-01-30T15:05:18Z</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2017-01-30T15:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce273db0ff1ae64fea785af25a43977b0b6a4555'/>
<id>urn:sha1:ce273db0ff1ae64fea785af25a43977b0b6a4555</id>
<content type='text'>
</content>
</entry>
<entry>
<title>iommu/dma: Allow MSI-only cookies</title>
<updated>2017-01-23T11:48:16Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2017-01-19T20:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fdbe574eb69312a7fbe09674d69c01b80e4ed9dc'/>
<id>urn:sha1:fdbe574eb69312a7fbe09674d69c01b80e4ed9dc</id>
<content type='text'>
IOMMU domain users such as VFIO face a similar problem to DMA API ops
with regard to mapping MSI messages in systems where the MSI write is
subject to IOMMU translation. With the relevant infrastructure now in
place for managed DMA domains, it's actually really simple for other
users to piggyback off that and reap the benefits without giving up
their own IOVA management, and without having to reinvent their own
wheel in the MSI layer.

Allow such users to opt into automatic MSI remapping by dedicating a
region of their IOVA space to a managed cookie, and extend the mapping
routine to implement a trivial linear allocator in such cases, to avoid
the needless overhead of a full-blown IOVA domain.

Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Reviewed-by: Tomasz Nowicki &lt;tomasz.nowicki@caviumnetworks.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Tested-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Tested-by: Tomasz Nowicki &lt;tomasz.nowicki@caviumnetworks.com&gt;
Tested-by: Bharat Bhushan &lt;bharat.bhushan@nxp.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED</title>
<updated>2017-01-19T15:56:19Z</updated>
<author>
<name>Mitchel Humpherys</name>
<email>mitchelh@codeaurora.org</email>
</author>
<published>2017-01-06T13:28:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=737c85ca1c3af4f97acb61cd53415ec039b31111'/>
<id>urn:sha1:737c85ca1c3af4f97acb61cd53415ec039b31111</id>
<content type='text'>
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that
are only accessible to privileged DMA engines.  Implement it in
dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it.

Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Tested-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Mitchel Humpherys &lt;mitchelh@codeaurora.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>iommu/dma: Implement dma_{map,unmap}_resource()</title>
<updated>2016-11-14T15:58:36Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2016-11-14T12:16:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=51f8cc9e818a9e6df376db7aeb5822d43e58cfb3'/>
<id>urn:sha1:51f8cc9e818a9e6df376db7aeb5822d43e58cfb3</id>
<content type='text'>
With the new dma_{map,unmap}_resource() functions added to the DMA API
for the benefit of cases like slave DMA, add suitable implementations to
the arsenal of our generic layer. Since cache maintenance should not be
a concern, these can both be standalone callback implementations without
the need for arch code wrappers.

CC: Joerg Roedel &lt;joro@8bytes.org&gt;
Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
</feed>
