Problems with dma_alloc_coherent()

John Whitney jwhitney-linuxppc at
Fri Apr 2 04:33:42 EST 2004

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

Yes, but both pci_alloc_consistent() and dma_alloc_coherent() return
physical addresses made with virt_to_bus() (at least they do in the
PowerPC tree).  This routine specifically adds the PCI-bus view of the
address space to the physical address produced.  I don't understand why
two different APIs are needed, if they both do the same thing.

This means that the address produced by pci_alloc_... and dma_alloc_...
are incorrect for a device like a direct memory-mapped encryption chip,
or in my case a northbridge DMA controller.


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

More information about the Linuxppc-dev mailing list