<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/dma/coherent.c, branch v6.5.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.5.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.5.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2022-06-24T15:30:54Z</updated>
<entry>
<title>dma-mapping: Add dma_release_coherent_memory to DMA API</title>
<updated>2022-06-24T15:30:54Z</updated>
<author>
<name>Mark-PK Tsai</name>
<email>mark-pk.tsai@mediatek.com</email>
</author>
<published>2022-04-22T06:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e61c451476e61450f6771ce03bbc01210a09be16'/>
<id>urn:sha1:e61c451476e61450f6771ce03bbc01210a09be16</id>
<content type='text'>
Add dma_release_coherent_memory to DMA API to allow dma
user call it to release dev-&gt;dma_mem when the device is
removed.

Signed-off-by: Mark-PK Tsai &lt;mark-pk.tsai@mediatek.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20220422062436.14384-2-mark-pk.tsai@mediatek.com
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: use 'bitmap_zalloc()' when applicable</title>
<updated>2021-10-27T06:20:09Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-10-24T17:40:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9fbd8dc19aa57ec8fe92606043199919527cd9be'/>
<id>urn:sha1:9fbd8dc19aa57ec8fe92606043199919527cd9be</id>
<content type='text'>
'dma_mem-&gt;bitmap' is a bitmap. So use 'bitmap_zalloc()' to simplify code,
improve the semantic and avoid some open-coded arithmetic in allocator
arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: make the global coherent pool conditional</title>
<updated>2021-08-19T07:02:39Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-24T17:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=22f9feb49950885cdb6e37513f134d154175e743'/>
<id>urn:sha1:22f9feb49950885cdb6e37513f134d154175e743</id>
<content type='text'>
Only build the code to support the global coherent pool if support for
it is enabled.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Dillon Min &lt;dillon.minfei@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: add a dma_init_global_coherent helper</title>
<updated>2021-08-18T14:24:11Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-23T14:05:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=39a2d3506b2d53c569a6db13d65b2f3728c4feec'/>
<id>urn:sha1:39a2d3506b2d53c569a6db13d65b2f3728c4feec</id>
<content type='text'>
Add a new helper to initialize the global coherent pool.  This both
cleans up the existing initialization which indirects through the
reserved_mem_ops that are normally only used for struct device, and
also allows using the global pool for non-devicetree architectures.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Dillon Min &lt;dillon.minfei@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: simplify dma_init_coherent_memory</title>
<updated>2021-08-18T14:24:10Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-23T14:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a6933571f34a9aee843fff2aa4b96949c57d6274'/>
<id>urn:sha1:a6933571f34a9aee843fff2aa4b96949c57d6274</id>
<content type='text'>
Return the allocated dma_coherent_mem structure, set the
use_dma_pfn_offset and print the failure warning inside of
dma_init_coherent_memory instead of leaving that to the callers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Dillon Min &lt;dillon.minfei@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: allow using the global coherent pool for !ARM</title>
<updated>2021-08-18T14:24:10Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-24T17:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=70d6aa0ecfed253a2b14659a6c77359af6d9b3ee'/>
<id>urn:sha1:70d6aa0ecfed253a2b14659a6c77359af6d9b3ee</id>
<content type='text'>
Switch an ifdef so that the global coherent pool is initialized for
any architecture that selects the DMA_GLOBAL_POOL symbol insted of
hardcoding ARM.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Dillon Min &lt;dillon.minfei@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove a trailing space</title>
<updated>2021-06-22T06:15:46Z</updated>
<author>
<name>Zhen Lei</name>
<email>thunder.leizhen@huawei.com</email>
</author>
<published>2021-06-08T07:52:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bab1622350699dc209db4f50d9ab99e6f6465334'/>
<id>urn:sha1:bab1622350699dc209db4f50d9ab99e6f6465334</id>
<content type='text'>
Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
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.stealer.net/cgit.cgi/user/sven/linux.git/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: introduce DMA range map, supplanting dma_pfn_offset</title>
<updated>2020-09-17T16:43:56Z</updated>
<author>
<name>Jim Quinlan</name>
<email>james.quinlan@broadcom.com</email>
</author>
<published>2020-09-17T16:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0d072782c734d27f5af062c62266f2598f68542'/>
<id>urn:sha1:e0d072782c734d27f5af062c62266f2598f68542</id>
<content type='text'>
The new field 'dma_range_map' in struct device is used to facilitate the
use of single or multiple offsets between mapping regions of cpu addrs and
dma addrs.  It subsumes the role of "dev-&gt;dma_pfn_offset" which was only
capable of holding a single uniform offset and had no region bounds
checking.

The function of_dma_get_range() has been modified so that it takes a single
argument -- the device node -- and returns a map, NULL, or an error code.
The map is an array that holds the information regarding the DMA regions.
Each range entry contains the address offset, the cpu_start address, the
dma_start address, and the size of the region.

of_dma_configure() is the typical manner to set range offsets but there are
a number of ad hoc assignments to "dev-&gt;dma_pfn_offset" in the kernel
driver code.  These cases now invoke the function
dma_direct_set_offset(dev, cpu_addr, dma_addr, size).

Signed-off-by: Jim Quinlan &lt;james.quinlan@broadcom.com&gt;
[hch: various interface cleanups]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Tested-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Tested-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: move the dma_declare_coherent_memory documentation</title>
<updated>2020-09-11T07:17:42Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-08-18T17:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a92df4f62fda02e6b141e2b0bb52ccc486264b1c'/>
<id>urn:sha1:a92df4f62fda02e6b141e2b0bb52ccc486264b1c</id>
<content type='text'>
dma_declare_coherent_memory should not be in a DMA API guide aimed
at driver writers (that is consumers of the API).  Move it to a comment
near the function instead.

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