On Fri, Sep 19, 2008 at 07:15:59AM +0900, FUJITA Tomonori wrote:
Sure, but that doesn't help for map_single/map_sg. The two cases are
quite different.
It used to at least, that is how I wrote it. That is it did all GFP_DMA,
GFP_DMA32, swiotlb, ZONE_NORMAL based on a fallback scheme.
The GART is somewhere in the 4GB range so you cannot use it to
map anything < 4GB.
Also GART is pretty small (and it's not a isolating) IOMMU so
if you can get direct memory allocation that fits you should
definitely do that.
GART uses the same logic, but only for alloc_cohernet, not for
map_sg/map_single and masks < 4GB.
Because GART cannot remap to addresses < 4GB reliably.
The big difference to the other IOMMUs is that it's only a tiny memory
hole somewhere near the 4GB boundary, not a full remapper of the full
4GB space.
Yes it does, just map_sg/map_single doesn't. And your patch changed
that in GART and that is what I objected too.
I don't hink it can, unless you want to write another swiotlb using
GFP_DMA (or use the dma allocator). That is because the swiotlb
has the same limitation as GART. It cannot reliably remap to < 4GB.
-Andi
--