Re: [PATCH] RFC: kills consistent_dma_mask

Jes Sorensen
2003-08-23T17:14:35Z

>>>>> "Krzysztof" == Krzysztof Halasa <khc@pm.waw.pl> writes:

Krzysztof> I think we should do it the following way: - adding
Krzysztof> pci_alloc_consistent_mask(..., u64 mask),
Krzysztof> pci_map_*_mask(..., mask) and DMA API friends - adding a
Krzysztof> routine checking if a mask is valid on given system -
Krzysztof> renaming existing routines to *_nomask and aliasing old
Krzysztof> names to them.

I don't like this approach as I mentioned before. IMHO it is adding
unnecessary overhead to the runtime point. Why should one pass in the
mask 5 times when it is enough to use pci_set_consistent_dma_mask
etc. For the consistent allocations it's just a nuisance however if
you add this to pci_map_*() then it's going to add real overhead to
the hot paths of drivers which is just plain wrong.

I still haven't seen a strong argument for the current API being
insufficient. Alan mentioned one device causing the problem with
multiple consistent masks, but are there many more device like that
out there?

Jes