Problems with dma_alloc_coherent()

John Whitney jwhitney-linuxppc at sands-edge.com
Fri Apr 2 03:51:54 EST 2004


>
> Yeah, that's really broken.  The changeover to dma-mapping.h is
> incomplete.  Tom and I were just talking about this because I
> think it exposes a bigger problem.  What I originally wanted
> was the PCI DMA API defined in terms of the generic DMA API
> on ppc32.  He just pointed out asm-generic/pci-dma-compat.h that
> we can leverage to do that.
>

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?

John


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list