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

David S. Miller (davem@redhat.com)
Thu, 5 Jul 2001 16:47:34 -0700 (PDT)


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/