Hello Shuah,
We agree that the streaming API was originally *intended* for short
map-unmap DMA sessions, and that dma_alloc_noncoherent() was the
*intended* API for those who want to hold the DMA during a device's
lifetime.
We also agree that on some platforms, DMA mappings are precious, an
On 06/06/14 19:01, Greg KH wrote:
Please try to put yourself in my position: I have a driver that I care
> about, which works fine for a few years. It's based upon dma_map_single(),
> which seems to be the common way to get non-coherent memory, even for the
> driver's entire lifespan. I realiz
Hello Joerg.
On 05/06/14 00:25, Joerg Roedel wrote:
What you are trying to do should work with dma_alloc_noncoherent(). The
API allows partial syncs on this memory, so you should be fine.
Please try to put yourself in my position: I have a driver that I care
about, which works fine for a
Hi,
I believe that I need a managed dma_map_single() my own driver, which
doesn't fall in the case of a single use: The driver allocates its
buffers with __get_free_pages() (or the to-be managed version of it).
Then it cuts the allocated memory into smaller buffers (in some cases,
and with ce
() into
dma_map_single_attrs(), and implements the former as a macro. Functions added:
* dmam_map_single_attrs()
* dmam_unmap_single_attrs()
Xillybus' driver works with and without this patch (depends on patches #1 and #3
only).
Thanks,
Eli
Eli Billauer (4):
dma-mapping: Add devm_ interfac
Managed device resource API replaces code that reinvents it for memory
allocation, page allocation and DMA mapping.
Suggested-by: Baruch Siach
Signed-off-by: Eli Billauer
---
drivers/staging/xillybus/xillybus.h | 38 +--
drivers/staging/xillybus/xillybus_core.c | 186
lways
returns success.
Thanks to Tejun Heo for suggesting this API.
Signed-off-by: Eli Billauer
---
Documentation/driver-model/devres.txt |2 +
drivers/base/dma-mapping.c| 86 +
include/linux/dma-mapping.h |6 ++-
3 files change
Signed-off-by: Eli Billauer
---
Documentation/driver-model/devres.txt |2 ++
include/asm-generic/pci-dma-compat.h | 18 ++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Documentation/driver-model/devres.txt
b/Documentation/driver-model/devres.txt
index
dmam_map_single_attrs() and dmam_unmap_single_attrs() replace the non-*_attrs
functions, which are implemented as defines instead.
The case of a non-NULL @attrs parameter has not been tested.
Suggested-by: Tejun Heo
Signed-off-by: Eli Billauer
---
Documentation/driver-model/devres.txt