Re: DMA API issues

From: David Brownell
Date: Fri Jun 18 2004 - 17:47:54 EST


James Bottomley wrote:
On Fri, 2004-06-18 at 16:08, David Brownell wrote:

I'm not following you. This isn't using the PCI DMA calls.
These dots don't connect: different hardware needs different
solutions. How would those calls make dma_alloc_coherent work?



The statement was "That's dma_alloc_coherent at its core ... it should
allocate from that 32K region." and what I was pointing out is that not
all platforms can treat an on-chip memory region as a real memory area.

But this one can, and it sure seems like the appropriate
solution. For reasons like the one not quoted above: it's
a good way to eliminate what would otherwise be a case
where a dmabounce is needed. And hey wow, it even uses
the API designed to reduce such DMA "mapping" costs, and
there are drivers already using it for such purposes.


That's why we have the iomem accessor functions.

You mentioned ioremap(), which doesn't help here since
the need is for a block of memory, not just address space,
and also memcpy_toio(), which just another tool to implement
the dma bouncing (which is on the "strongly avoid!" list).

As I said, those still don't make dma_alloc_coherent() work.

- Dave


James





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/