[PATCH] powerpc: Fix swiotlb ops for ppc64

Becky Bruce beckyb at kernel.crashing.org
Wed Dec 14 13:53:25 EST 2011


On Dec 12, 2011, at 10:27 PM, Benjamin Herrenschmidt wrote:

> On Mon, 2011-12-12 at 21:55 -0600, Becky Bruce wrote:
>> 1) dma_direct_alloc_coherent strips GFP_HIGHMEM out of the flags field
>> when calling the actual allocator and the iotlb version does not.  I
>> don't know how much this matters - I did a quick grep and I don't see
>> any users that specify that, but somebody went through the trouble of
>> putting it in there in the first place and without knowing why I
>> wasn't willing to get rid of it.  Now, since my patch it looks like
>> someone added a VM_BUG_ON into __get_free_pages() if GFP_HIGHMEM so
>> this would get caught.  However, I don't know if we really want to
>> throw a bug there.
>> 
>> 2)  The iotlb code doesn't deal with the !coherent parts like 8xx.  We
>> can work around that by setting up the dma_ops differently for that
>> case instead.
> 
> Does the rest of it handle them ? I mean swiotlb_map_sg_attrs etc...

The non-coherent "specialness" is in the dma sync stuff and no, I don't think the iotlb stuff deals with that properly.

Do you not have a problem with 1)?  If not then I think we can look at switching over; 2) was more of a secondary thing.

-B



More information about the Linuxppc-dev mailing list