<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/Documentation/DMA-API.txt, branch v3.19</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=v3.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-05-26T23:28:27Z</updated>
<entry>
<title>DMA-API: Capitalize "CPU" consistently</title>
<updated>2014-05-26T23:28:27Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-05-20T22:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f311a724a79669ac0336932d0361325afdb54279'/>
<id>urn:sha1:f311a724a79669ac0336932d0361325afdb54279</id>
<content type='text'>
Sometimes we used "cpu," other times "CPU."  Use "CPU" consistently.

Suggested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t</title>
<updated>2014-05-20T22:55:23Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-05-20T22:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88a984ba0795f14a3847edbd7fabe652289ea89b'/>
<id>urn:sha1:88a984ba0795f14a3847edbd7fabe652289ea89b</id>
<content type='text'>
dma_declare_coherent_memory() takes two addresses for a region of memory: a
"bus_addr" and a "device_addr".  I think the intent is that "bus_addr" is
the physical address a *CPU* would use to access the region, and
"device_addr" is the bus address the *device* would use to address the
region.

Rename "bus_addr" to "phys_addr" and change its type to phys_addr_t.
Most callers already supply a phys_addr_t for this argument.  The others
supply a 32-bit integer (a constant, unsigned int, or __u32) and need no
change.

Use "unsigned long", not phys_addr_t, to hold PFNs.

No functional change (this could theoretically fix a truncation in a config
with 32-bit dma_addr_t and 64-bit phys_addr_t, but I don't think there are
any such cases involving this code).

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: James Bottomley &lt;jbottomley@Parallels.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;</content>
</entry>
<entry>
<title>DMA-API: Clarify physical/bus address distinction</title>
<updated>2014-05-20T22:54:21Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-04-30T17:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77f2ea2f8d0833f9e976368481fb9a0775acf9e7'/>
<id>urn:sha1:77f2ea2f8d0833f9e976368481fb9a0775acf9e7</id>
<content type='text'>
The DMA-API documentation sometimes refers to "physical addresses" when it
really means "bus addresses."  Sometimes these are identical, but they may
be different if the bridge leading to the bus performs address translation.
Update the documentation to use "bus address" when appropriate.

Also, consistently capitalize "DMA", use parens with function names, use
dev_printk() in examples, and reword a few sections for clarity.

No functional change; documentation changes only.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: James Bottomley &lt;jbottomley@Parallels.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;</content>
</entry>
<entry>
<title>DMA-API: provide a helper to set both DMA and coherent DMA masks</title>
<updated>2013-09-17T14:32:37Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2013-06-26T12:49:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4aa806b771d16b810771d86ce23c4c3160888db3'/>
<id>urn:sha1:4aa806b771d16b810771d86ce23c4c3160888db3</id>
<content type='text'>
Provide a helper to set both the DMA and coherent DMA masks to the
same value - this avoids duplicated code in a number of drivers,
sometimes with buggy error handling, and also allows us identify
which drivers do things differently.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>dma-debug: New interfaces to debug dma mapping errors</title>
<updated>2012-10-24T15:06:43Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuah.khan@hp.com</email>
</author>
<published>2012-10-08T17:08:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c9c6d6301287e369a754d628230fa6e50cdb74b'/>
<id>urn:sha1:6c9c6d6301287e369a754d628230fa6e50cdb74b</id>
<content type='text'>
Add dma-debug interface debug_dma_mapping_error() to debug
drivers that fail to check dma mapping errors on addresses
returned by dma_map_single() and dma_map_page() interfaces.
This interface clears a flag set by debug_dma_map_page() to
indicate that dma_mapping_error() has been called by the
driver. When driver does unmap, debug_dma_unmap() checks the
flag and if this flag is still set, prints warning message
that includes call trace that leads up to the unmap. This
interface can be called from dma_mapping_error() routines to
enable dma mapping error check debugging.

Tested: Intel iommu and swiotlb (iommu=soft) on x86-64 with
        CONFIG_DMA_API_DEBUG enabled and disabled.

Signed-off-by: Shuah Khan &lt;shuah.khan@hp.com&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>include/linux/dma-mapping.h: add dma_zalloc_coherent()</title>
<updated>2011-11-02T23:07:02Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2011-11-02T20:39:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=842fa69f3e0c9a178b294e7af7c07f4c9d9e7af2'/>
<id>urn:sha1:842fa69f3e0c9a178b294e7af7c07f4c9d9e7af2</id>
<content type='text'>
Lots of driver code does a dma_alloc_coherent() and then zeroes out the
memory with a memset.  Make it easy for them.

Cc: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove dma_is_consistent API</title>
<updated>2010-08-11T15:59:21Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2010-08-11T01:03:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b9c6c11f519718d618f5d7c9508daf78b207f6f'/>
<id>urn:sha1:3b9c6c11f519718d618f5d7c9508daf78b207f6f</id>
<content type='text'>
Architectures implement dma_is_consistent() in different ways (some
misinterpret the definition of API in DMA-API.txt).  So it hasn't been so
useful for drivers.  We have only one user of the API in tree.  Unlikely
out-of-tree drivers use the API.

Even if we fix dma_is_consistent() in some architectures, it doesn't look
useful at all.  It was invented long ago for some old systems that can't
allocate coherent memory at all.  It's better to export only APIs that are
definitely necessary for drivers.

Let's remove this API.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: rename PCI-DMA-mapping.txt to DMA-API-HOWTO.txt</title>
<updated>2010-03-12T23:52:43Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2010-03-10T23:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51e7364ef281e540371f084008732b13292622f0'/>
<id>urn:sha1:51e7364ef281e540371f084008732b13292622f0</id>
<content type='text'>
Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: remove the PCI DMA API description in DMA-API.txt</title>
<updated>2010-03-12T23:52:43Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2010-03-10T23:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5a69f4c1319c03b946e1e99a590b6002aa3e5ef'/>
<id>urn:sha1:f5a69f4c1319c03b946e1e99a590b6002aa3e5ef</id>
<content type='text'>
- remove the PCI DMA API description in DMA-API.txt
- remove the descriptions of dma_unmap macros since
  PCI-DMA-mapping.txt has the same description.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Reviewed-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: dma-mapping.h: add dma_set_coherent_mask</title>
<updated>2010-03-12T23:52:42Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2010-03-10T23:23:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a1961f49ee8d7339ea2454443dfc0460e0b2748'/>
<id>urn:sha1:6a1961f49ee8d7339ea2454443dfc0460e0b2748</id>
<content type='text'>
dma_set_coherent_mask corresponds to pci_set_consistent_dma_mask.  This is
necessary to move to the generic device model DMA API from the PCI bus
specific API in the long term.

dma_set_coherent_mask works in the exact same way that
pci_set_consistent_dma_mask does.  So this patch also changes
pci_set_consistent_dma_mask to call dma_set_coherent_mask.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: James Bottomley &lt;James.Bottomley@suse.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
