Problems with dma_alloc_coherent()

Eugene Surovegin ebs at
Fri Apr 2 04:19:26 EST 2004

On Thu, Apr 01, 2004 at 12:51:54PM -0500, John Whitney wrote:
> I noticed that all the PCI and DMA coherency routines seem to assume
> that DMA will occur between memory and a bus device (all physical
> addresses returned are converted to a bus address).  Is this really the
> desired action?  I would have prefered to have the PCI routines return
> bus-correct physical addresses, and the DMA routines return processor
> physical addresses (so they can be used for non-bus-related DMA, to a
> direct memory-mapped encryption chip, for example).  Is this the
> eventual implementation of those functions, or are all DMA transactions
> expected to be to or from a PCI-based device?

Hmm, I don't understand this, bus != PCI bus. All devices sit on some kind of
bus, even your encryption chip.

As far as I understand, DMA API was added exactly because we may have different
(from PCI) buses.

Current implementation just relies on the fact that PCI devices view system
memory the same way as other-bus devices (e.g. OCP devices which sit on OPB).

In more general case, yes, "views" can be different for each bus type or even
for each bus...


** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list