<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/base/dma-mapping.c, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-11-30T12:04:53+00:00</updated>
<entry>
<title>drivers: base: dma-mapping: Fix typo in dmam_alloc_non_coherent comments</title>
<updated>2016-11-30T12:04:53+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2016-11-30T01:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd74da957ba2d03787ede1c22bbb183d9c728aad'/>
<id>urn:sha1:cd74da957ba2d03787ede1c22bbb183d9c728aad</id>
<content type='text'>
The function we are wrapping is named dma_alloc_noncoherent, and
not dma_alloc_non_coherent.

Fixes: 9ac7849e35f70 ("devres: device resource management")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/base dmam_declare_coherent_memory leaks</title>
<updated>2016-08-31T13:19:55+00:00</updated>
<author>
<name>Vyacheslav V. Yurkov</name>
<email>uvv.mail@gmail.com</email>
</author>
<published>2016-06-14T07:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=775115c06091fcfa1189a50aca488fa596839617'/>
<id>urn:sha1:775115c06091fcfa1189a50aca488fa596839617</id>
<content type='text'>
dmam_declare_coherent_memory doesn't take into account the return
value of dma_declare_coherent_memory, which leads to incorrect resource
handling

Signed-off-by: Vyacheslav V. Yurkov &lt;uvv.mail@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: use vma_pages().</title>
<updated>2016-08-31T13:13:56+00:00</updated>
<author>
<name>Muhammad Falak R Wani</name>
<email>falakreyaz@gmail.com</email>
</author>
<published>2016-05-21T13:22:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=95da00e35acf92bb5d39f6f08267de0c1a5c8885'/>
<id>urn:sha1:95da00e35acf92bb5d39f6f08267de0c1a5c8885</id>
<content type='text'>
Replace explicit computation of vma page count by a call to
vma_pages()

Signed-off-by: Muhammad Falak R Wani &lt;falakreyaz@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: base: dma-mapping: page align the size when unmap_kernel_range</title>
<updated>2016-08-31T13:13:56+00:00</updated>
<author>
<name>Peng Fan</name>
<email>van.freenix@gmail.com</email>
</author>
<published>2016-07-21T08:04:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=85714108e673cdebf1b96abfd50fb02a29e37577'/>
<id>urn:sha1:85714108e673cdebf1b96abfd50fb02a29e37577</id>
<content type='text'>
When dma_common_free_remap, the input parameter 'size' may not
be page aligned. And, met kernel warning when doing iommu dma
for usb on i.MX8 platform:
"
WARNING: CPU: 0 PID: 869 at mm/vmalloc.c:70 vunmap_page_range+0x1cc/0x1d0()
Modules linked in:
CPU: 0 PID: 869 Comm: kworker/u8:2 Not tainted 4.1.12-00444-gc5f9d1d-dirty #147
Hardware name: Freescale i.MX8DV Sabreauto (DT)
Workqueue: ci_otg ci_otg_work
Call trace:
[&lt;ffffffc000089920&gt;] dump_backtrace+0x0/0x124
[&lt;ffffffc000089a54&gt;] show_stack+0x10/0x1c
[&lt;ffffffc0006d1e6c&gt;] dump_stack+0x84/0xc8
[&lt;ffffffc0000b4568&gt;] warn_slowpath_common+0x98/0xd0
[&lt;ffffffc0000b4664&gt;] warn_slowpath_null+0x14/0x20
[&lt;ffffffc000170348&gt;] vunmap_page_range+0x1c8/0x1d0
[&lt;ffffffc000170388&gt;] unmap_kernel_range+0x20/0x88
[&lt;ffffffc000460ad0&gt;] dma_common_free_remap+0x74/0x84
[&lt;ffffffc0000940d8&gt;] __iommu_free_attrs+0x9c/0x178
[&lt;ffffffc0005032bc&gt;] ehci_mem_cleanup+0x140/0x194
[&lt;ffffffc000503548&gt;] ehci_stop+0x8c/0xdc
[&lt;ffffffc0004e8258&gt;] usb_remove_hcd+0xf0/0x1cc
[&lt;ffffffc000516bc0&gt;] host_stop+0x1c/0x58
[&lt;ffffffc000514240&gt;] ci_otg_work+0xdc/0x120
[&lt;ffffffc0000c9c34&gt;] process_one_work+0x134/0x33c
[&lt;ffffffc0000c9f78&gt;] worker_thread+0x13c/0x47c
[&lt;ffffffc0000cf43c&gt;] kthread+0xd8/0xf0
"

For dma_common_pages_remap:
dma_common_pages_remap
   |-&gt;get_vm_area_caller
        |-&gt;__get_vm_area_node
            |-&gt;size = PAGE_ALIGN(size);   Round up to page aligned

So, in dma_common_free_remap, we also need a page aligned size,
pass 'PAGE_ALIGN(size)' to unmap_kernel_range.

Signed-off-by: Peng Fan &lt;van.freenix@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove &lt;asm-generic/dma-coherent.h&gt;</title>
<updated>2016-01-21T01:09:18+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-01-20T23:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20d666e41166f8023ff3d960e832d87ded18c5c4'/>
<id>urn:sha1:20d666e41166f8023ff3d960e832d87ded18c5c4</id>
<content type='text'>
This wasn't an asm-generic header to start with, and can be merged into
dma-mapping.h trivially.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Aurelien Jacquiot &lt;a-jacquiot@ti.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@gmail.com&gt;
Cc: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Cc: Koichi Yasutake &lt;yasutake.koichi@jp.panasonic.com&gt;
Cc: Ley Foon Tan &lt;lftan@altera.com&gt;
Cc: Mark Salter &lt;msalter@redhat.com&gt;
Cc: Mikael Starvik &lt;starvik@axis.com&gt;
Cc: Steven Miao &lt;realmz6@gmail.com&gt;
Cc: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Joerg Roedel &lt;jroedel@suse.de&gt;
Cc: Sebastian Ott &lt;sebott@linux.vnet.ibm.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: make the generic coherent dma mmap implementation optional</title>
<updated>2016-01-21T01:09:18+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-01-20T23:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d4a619b64bad7117947a84a10c17a2b8f14d252'/>
<id>urn:sha1:0d4a619b64bad7117947a84a10c17a2b8f14d252</id>
<content type='text'>
This series converts all remaining architectures to use dma_map_ops and
the generic implementation of the DMA API.  This not only simplifies the
code a lot, but also prepares for possible future changes like more
generic non-iommu dma_ops implementations or generic per-device
dma_map_ops.

This patch (of 16):

We have a couple architectures that do not want to support this code, so
add another Kconfig symbol that disables the code similar to what we do
for the nommu case.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@gmail.com&gt;
Cc: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Cc: Steven Miao &lt;realmz6@gmail.com&gt;
Cc: Ley Foon Tan &lt;lftan@altera.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Koichi Yasutake &lt;yasutake.koichi@jp.panasonic.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Aurelien Jacquiot &lt;a-jacquiot@ti.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Cc: Mark Salter &lt;msalter@redhat.com&gt;
Cc: Mikael Starvik &lt;starvik@axis.com&gt;
Cc: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Joerg Roedel &lt;jroedel@suse.de&gt;
Cc: Sebastian Ott &lt;sebott@linux.vnet.ibm.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>drivers: base: dma-mapping: Erase blank space after pointer</title>
<updated>2015-03-25T13:36:19+00:00</updated>
<author>
<name>Marius Cristian Eseanu</name>
<email>eseanu.cristian@gmail.com</email>
</author>
<published>2015-03-08T10:34:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d42d79e640fd1cd8fd97d11c8693f8907fc4eac'/>
<id>urn:sha1:6d42d79e640fd1cd8fd97d11c8693f8907fc4eac</id>
<content type='text'>
This patch fixes the following checkpatch.pl error:
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Marius Cristian Eseanu &lt;eseanu.cristian@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>common: dma-mapping: introduce common remapping functions</title>
<updated>2014-10-10T02:25:52+00:00</updated>
<author>
<name>Laura Abbott</name>
<email>lauraa@codeaurora.org</email>
</author>
<published>2014-10-09T22:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=513510ddba9650fc7da456eefeb0ead7632324f6'/>
<id>urn:sha1:513510ddba9650fc7da456eefeb0ead7632324f6</id>
<content type='text'>
For architectures without coherent DMA, memory for DMA may need to be
remapped with coherent attributes.  Factor out the the remapping code from
arm and put it in a common location to reduce code duplication.

As part of this, the arm APIs are now migrated away from
ioremap_page_range to the common APIs which use map_vm_area for remapping.
 This should be an equivalent change and using map_vm_area is more correct
as ioremap_page_range is intended to bring in io addresses into the cpu
space and not regular kernel managed memory.

Signed-off-by: Laura Abbott &lt;lauraa@codeaurora.org&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: David Riley &lt;davidriley@chromium.org&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Ritesh Harjain &lt;ritesh.harjani@gmail.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Laura Abbott &lt;lauraa@codeaurora.org&gt;
Cc: Mitchel Humpherys &lt;mitchelh@codeaurora.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>DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t</title>
<updated>2014-05-20T22:55:23+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-05-20T22:54:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>[media] dma-mapping: fix dma_common_get_sgtable() conditional compilation</title>
<updated>2012-11-27T11:42:31+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2012-11-26T13:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6c22955f80f2db9614b01fe5a3d1cfcd8b3d848'/>
<id>urn:sha1:c6c22955f80f2db9614b01fe5a3d1cfcd8b3d848</id>
<content type='text'>
dma_common_get_sgtable() function doesn't depend on
ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY, so it must not be compiled
conditionally.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
</feed>
