<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/dma/mapping.c, branch v5.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-11-27T09:33:40Z</updated>
<entry>
<title>dma-mapping: Allow mixing bypass and mapped DMA operation</title>
<updated>2020-11-27T09:33:40Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
<email>aik@ozlabs.ru</email>
</author>
<published>2020-10-29T01:52:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d8d53cf8fd028310b1189165b939cde124895d7'/>
<id>urn:sha1:8d8d53cf8fd028310b1189165b939cde124895d7</id>
<content type='text'>
At the moment we allow bypassing DMA ops only when we can do this for
the entire RAM. However there are configs with mixed type memory
where we could still allow bypassing IOMMU in most cases;
POWERPC with persistent memory is one example.

This adds an arch hook to determine where bypass can still work and
we invoke direct DMA API. The following patch checks the bus limit
on POWERPC to allow or disallow direct mapping.

This adds a ARCH_HAS_DMA_MAP_DIRECT config option to make the arch_xxxx
hooks no-op by default.

Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: move large parts of &lt;linux/dma-direct.h&gt; to kernel/dma</title>
<updated>2020-10-06T05:07:06Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-22T13:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19c65c3d30bb5a97170e425979d2e44ab2096c7d'/>
<id>urn:sha1:19c65c3d30bb5a97170e425979d2e44ab2096c7d</id>
<content type='text'>
Most of the dma_direct symbols should only be used by direct.c and
mapping.c, so move them to kernel/dma.  In fact more of dma-direct.h
should eventually move, but that will require more coordination with
other subsystems.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: move dma-debug.h to kernel/dma/</title>
<updated>2020-10-06T05:07:05Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-11T08:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1fd09e8e6ae35228ecc7c1e4bfff1fd725f78a0'/>
<id>urn:sha1:a1fd09e8e6ae35228ecc7c1e4bfff1fd725f78a0</id>
<content type='text'>
Most of dma-debug.h is not required by anything outside of kernel/dma.
Move the four declarations needed by dma-mappin.h or dma-ops providers
into dma-mapping.h and dma-map-ops.h, and move the remainder of the
file to kernel/dma/debug.h.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: split &lt;linux/dma-mapping.h&gt;</title>
<updated>2020-10-06T05:07:03Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-22T13:31:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a0f0d8be76dcd4390ff538e7060fda34db79717'/>
<id>urn:sha1:0a0f0d8be76dcd4390ff538e7060fda34db79717</id>
<content type='text'>
Split out all the bits that are purely for dma_map_ops implementations
and related code into a new &lt;linux/dma-map-ops.h&gt; header so that they
don't get pulled into all the drivers.  That also means the architecture
specific &lt;asm/dma-mapping.h&gt; is not pulled in by &lt;linux/dma-mapping.h&gt;
any more, which leads to a missing includes that were pulled in by the
x86 or arm versions in a few not overly portable drivers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods</title>
<updated>2020-09-25T04:20:47Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-01T11:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de7cf917768f438aae6d2f4e9bced3739f15f5b6'/>
<id>urn:sha1:de7cf917768f438aae6d2f4e9bced3739f15f5b6</id>
<content type='text'>
This will allow IOMMU drivers to allocate non-contigous memory and
return a vmapped virtual address.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: add a new dma_alloc_pages API</title>
<updated>2020-09-25T04:20:47Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-01T11:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=efa70f2fdc842e63a0a13223e0e83cedcc2117f1'/>
<id>urn:sha1:efa70f2fdc842e63a0a13223e0e83cedcc2117f1</id>
<content type='text'>
This API is the equivalent of alloc_pages, except that the returned memory
is guaranteed to be DMA addressable by the passed in device.  The
implementation will also be used to provide a more sensible replacement
for DMA_ATTR_NON_CONSISTENT flag.

Additionally dma_alloc_noncoherent is switched over to use dma_alloc_pages
as its backend.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt; (MIPS part)
</content>
</entry>
<entry>
<title>dma-mapping: remove dma_cache_sync</title>
<updated>2020-09-25T04:20:46Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-01T11:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a84292271402cffe0717bc58e2ad9a0c7977272'/>
<id>urn:sha1:5a84292271402cffe0717bc58e2ad9a0c7977272</id>
<content type='text'>
All users are gone now, remove the API.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt; (MIPS part)
</content>
</entry>
<entry>
<title>dma-direct: Fix potential NULL pointer dereference</title>
<updated>2020-09-17T16:43:20Z</updated>
<author>
<name>Thomas Tai</name>
<email>thomas.tai@oracle.com</email>
</author>
<published>2020-09-17T16:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f959dcd6ddfd29235030e8026471ac1b022ad2b0'/>
<id>urn:sha1:f959dcd6ddfd29235030e8026471ac1b022ad2b0</id>
<content type='text'>
When booting the kernel v5.9-rc4 on a VM, the kernel would panic when
printing a warning message in swiotlb_map(). The dev-&gt;dma_mask must not
be a NULL pointer when calling the dma mapping layer. A NULL pointer
check can potentially avoid the panic.

Signed-off-by: Thomas Tai &lt;thomas.tai@oracle.com&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: move dma_common_{mmap,get_sgtable} out of mapping.c</title>
<updated>2020-09-11T07:14:56Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-08-18T07:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=545d29272f38ba4791cca2a5a86fe6766f462f18'/>
<id>urn:sha1:545d29272f38ba4791cca2a5a86fe6766f462f18</id>
<content type='text'>
Add a new file that contains helpers for misc DMA ops, which is only
built when CONFIG_DMA_OPS is set.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: add a dma_ops_bypass flag to struct device</title>
<updated>2020-07-19T07:29:29Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-03-23T17:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d35834c64820c7ef397f8a244061d4450720540e'/>
<id>urn:sha1:d35834c64820c7ef397f8a244061d4450720540e</id>
<content type='text'>
Several IOMMU drivers have a bypass mode where they can use a direct
mapping if the devices DMA mask is large enough.  Add generic support
to the core dma-mapping code to do that to switch those drivers to
a common solution.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Reviewed-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
</content>
</entry>
</feed>
