Problems with dma_alloc_coherent()
Adrian Cox
adrian at humboldt.co.uk
Mon Apr 5 19:05:37 EST 2004
On Sat, 2004-04-03 at 13:43, John Whitney wrote:
> One of the nice things about having the DMA-core, however, was that it
> accepted virtual addresses and handled cache consistency. If the
> driver is accepting physical addresses only, it can't do that. This
> means the client would have to allocate space using the DMA/PCI to get
> the same coherency, which means all addresses will be
> PCI-address-space. Should the individual drivers accept this and just
> subtract off PCI_DRAM_OFFSET (or equivalent) to get back to a physical
> address? This is what would make life hell for a cross-platform DMA
> controller.
What I would like is a general API for a block move between memory and a
dumb PCI peripheral. Something like mempcy_toio() but with the
expectation of it sleeping.
Your local bus peripheral might benefit from a standard API, but I'm
still not convinced that there will be many cross-platform DMA
controllers. All the ones I've seen are tightly coupled to the
northbridge or system-on-a-chip internal bus. I'd still prefer a shared
interface rather than implementation, and I'd suggest taking an
interface proposal to the linux-arm-kernel and linuxppc-embedded lists.
- Adrian Cox
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev
mailing list