Re: [PATCH 0/3] fix GART to respect device's dma_mask about virtual mappings

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Thursday, September 18, 2008 - 11:20 am

> The falling back mechanism was moved to pci-nommu from the common code

There's no fallback for _map_sg/_map_single. All the fallback to GFP
only works for coherent allocations, but not for streaming mappings.

To make this "fully robust" for masks < 32bit you would need to implement 
a new swiotlb that uses GFP_DMA allocations as fallback (or use the DMA 
allocator's swiotlb which can actually handle this)

So you're right now basically checking for something that you cannot
fix. And also you try to check for (but not handle) something that even 
32bit x86 doesn't handle. So if some driver relied on you checking
for it on 64bit it wouldn't work on 32bit x86 which would be a bad 
thing.


On a full IOMMU like calgary it's easier to do because you don't
 need to deal with GFP_DMA at least. But as you say it's unlikely
to be worth the effort on these systems.

Also the earlier problem that it wouldn't work on 32bit x86 and other
systems would make it also not too useful. Having drivers that only
work on Calgary wouldn't be a good thing.

-Andi

-- 
ak@linux.intel.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] add iommu_device_max_index IOMMU helper function, FUJITA Tomonori, (Fri Sep 12, 3:42 am)
[PATCH 2/3] add dma_get_mask helper function, FUJITA Tomonori, (Fri Sep 12, 3:42 am)
Re: [PATCH 0/3] fix GART to respect device's dma_mask abou ..., Andi Kleen, (Thu Sep 18, 11:20 am)