Re: DMA API issues

From: David Brownell
Date: Sun Jun 20 2004 - 15:10:08 EST


James Bottomley wrote:

The DMA API is about allowing devices to transact directly with memory
behind the memory controller, ...

Nope, that's certainly not in the API spec. Never has been,
and I'd have objected if it had been ... because I knew this
was one of the types of hardware the API needed to support as
Linux ran on more systems. The call syntax just returns two
addresses, usable by host and by device:

void *
dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, int flag);

That doesn't say ANYTHING about where that memory lives, or
who may or may not have set up a "struct page" (or what the
page size is for that component). It certainly doesn't make
assumptions about which busses are used by CPU or device for
memory or control access, or how they're linked.

- Dave


-
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/