Re: (reposting) how to get DMA'able memory within 4GB on 64-bit m achi ne

David S. Miller
2001-07-05T23:48:08Z

Jes Sorensen writes:
> The dma_mask in struct pci_dev tells you whether you are DAC
> capable. We pass a pointer to this struct when we call the pci_*
> functions so the required information needed to make the decision
> whether to return a SAC or a DAC address is already available.

The decision is not based upon "device capable of DAC", that is
precisely my point.

The decision must be based upon a number of considerations.

1) Can it do DAC

2) Is DAC more efficient than SAC on this platform

3) Does the devices _need_ DAC even if it is slower because
it requires referencing large portions of the DMA
address space simultaneously

Sure, you could imply all of this complexity in the driver
by making them consider all of these issues when setting the
mask, but that isn't a nice interface at all.

And this still leaves the 64-bit dma_addr_t overhead issue.

Later,
David S. Miller
davem@redhat.com