Re: Proposal for new generic device API: dma_get_required_mask()

James Bottomley
2004-06-20T16:56:34Z

On Sat, 2004-06-19 at 18:39, Krzysztof Halasa wrote:
> The problem is that (depending on platform) the pci_map_* and dma_map_*
> functions ignore both masks. An example of such platform is i386 :-)
>
> It seems the masks are used on i386 for only one thing - consistent
> dma mask is used for consistent allocations only, and normal dma mask
> is not used at all.

Actually, I think you misunderstand the way the API works. The only
time the dma_map_ functions pay attention to the mask is in an IOMMU
transaction. For no-IOMMU systems, its far more efficient for bouncing
to occur in the upper layers (as it does for block and net).

> The normal mask is used mainly on 64-bit platforms and the meaningful
> values are 2^32-1 and 2^64-1. It's used by PCI-X device drivers to
> enable DAC transfers. This is why it isn't used on 32-bit platforms.

This statement is incorrect, Russell has already given you a counter
example.

James