<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/dma-mapping.h, branch v4.20.9</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.20.9</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.20.9'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-12-22T16:46:27Z</updated>
<entry>
<title>dma-mapping: fix flags in dma_alloc_wc</title>
<updated>2018-12-22T16:46:27Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-12-22T08:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0cd60eb1a7b5421e92a3489e1829bfb2243e21e1'/>
<id>urn:sha1:0cd60eb1a7b5421e92a3489e1829bfb2243e21e1</id>
<content type='text'>
We really need the writecombine flag in dma_alloc_wc, fix a stupid
oversight.

Fixes: 7ed1d91a9e ("dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN")
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN</title>
<updated>2018-10-09T13:08:26Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-09-24T11:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7ed1d91a9ed61afe438ba51cbf49cb567ab7dca8'/>
<id>urn:sha1:7ed1d91a9ed61afe438ba51cbf49cb567ab7dca8</id>
<content type='text'>
This allows all dma_map_ops instances to entirely rely on
DMA_ATTR_NO_WARN going forward.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
</content>
</entry>
<entry>
<title>dma-debug: Check for drivers mapping invalid addresses in dma_map_single()</title>
<updated>2018-10-08T07:44:17Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-10-08T07:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=99c65fa7c59ff558e70db8aa61bbdece5d3a9588'/>
<id>urn:sha1:99c65fa7c59ff558e70db8aa61bbdece5d3a9588</id>
<content type='text'>
I recently debugged a DMA mapping oops where a driver was trying to map
a buffer returned from request_firmware() with dma_map_single(). Memory
returned from request_firmware() is mapped into the vmalloc region and
this isn't a valid region to map with dma_map_single() per the DMA
documentation's "What memory is DMA'able?" section.

Unfortunately, we don't really check that in the DMA debugging code, so
enabling DMA debugging doesn't help catch this problem. Let's add a new
DMA debug function to check for a vmalloc address or an invalid virtual
address and print a warning if this happens. This makes it a little
easier to debug these sorts of problems, instead of seeing odd behavior
or crashes when drivers attempt to map the vmalloc space for DMA.

Cc: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: make the get_required_mask method available unconditionally</title>
<updated>2018-10-01T14:27:00Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-09-06T23:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6d4381220a0087ce19dbf6984d92c451bd6b364'/>
<id>urn:sha1:c6d4381220a0087ce19dbf6984d92c451bd6b364</id>
<content type='text'>
This save some duplication for ia64, and makes the interface more
general.  In the long run we want each dma_map_ops instance to fill this
out, but this will take a little more prep work.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>Revert "dma-mapping: clear dev-&gt;dma_ops in arch_teardown_dma_ops"</title>
<updated>2018-09-25T22:12:26Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-09-25T20:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1a0afc14b5da329765d6ecd4a79f546b9363ad8c'/>
<id>urn:sha1:1a0afc14b5da329765d6ecd4a79f546b9363ad8c</id>
<content type='text'>
This reverts commit 46053c73685411915d3de50c5a0045beef32806b.

This change breaks architectures setting up dma_ops in their own magic
way and not using arch_setup_dma_ops, so revert it.

Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: support non-coherent devices in dma_common_get_sgtable</title>
<updated>2018-09-20T07:01:17Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-08-23T07:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9406a49fd1f4379409ed87b29fdaa259b0441912'/>
<id>urn:sha1:9406a49fd1f4379409ed87b29fdaa259b0441912</id>
<content type='text'>
We can use the arch_dma_coherent_to_pfn hook to provide a -&gt;get_sgtable
implementation.  Note that this isn't an endorsement of this interface
(which is a horrible bad idea), but it is required to move arm64 over
to the generic code without a loss of functionality.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: consolidate the dma mmap implementations</title>
<updated>2018-09-20T07:01:16Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-09-11T06:55:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=58b0440663ec11372befb8ead0ee7099d8878590'/>
<id>urn:sha1:58b0440663ec11372befb8ead0ee7099d8878590</id>
<content type='text'>
The only functional differences (modulo a few missing fixes in the arch
code) is that architectures without coherent caches need a hook to
convert a virtual or dma address into a pfn, given that we don't have
the kernel linear mapping available for the otherwise easy virt_to_page
call.  As a side effect we can support mmap of the per-device coherent
area even on architectures not providing the callback, and we make
previous dangerous default methods dma_common_mmap actually save for
non-coherent architectures by rejecting it without the right helper.

In addition to that we need a hook so that some architectures can
override the protection bits when mmaping a dma coherent allocations.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Paul Burton &lt;paul.burton@mips.com&gt; # MIPS parts
</content>
</entry>
<entry>
<title>dma-mapping: merge direct and noncoherent ops</title>
<updated>2018-09-20T07:01:15Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-09-08T09:22:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bc3ec75de5452db59b683487867ba562b950708a'/>
<id>urn:sha1:bc3ec75de5452db59b683487867ba562b950708a</id>
<content type='text'>
All the cache maintainance is already stubbed out when not enabled,
but merging the two allows us to nicely handle the case where
cache maintainance is required for some devices, but not others.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Paul Burton &lt;paul.burton@mips.com&gt; # MIPS parts
</content>
</entry>
<entry>
<title>dma-mapping: clear dev-&gt;dma_ops in arch_teardown_dma_ops</title>
<updated>2018-09-08T09:19:38Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-08-24T08:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46053c73685411915d3de50c5a0045beef32806b'/>
<id>urn:sha1:46053c73685411915d3de50c5a0045beef32806b</id>
<content type='text'>
There is no reason to leave the per-device dma_ops around when
deconfiguring a device, so move this code from arm64 into the
common code.

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: remove dma_deconfigure</title>
<updated>2018-09-08T09:19:28Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-08-24T08:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dc3c05504d38849f77149cb962caeaedd1efa127'/>
<id>urn:sha1:dc3c05504d38849f77149cb962caeaedd1efa127</id>
<content type='text'>
This goes through a lot of hooks just to call arch_teardown_dma_ops.
Replace it with a direct call instead.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
</content>
</entry>
</feed>
