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 - 5:44 pm

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
--
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, 5:44 pm)