On 2/26/19 6:29 AM, Christoph Hellwig wrote:
I don't think this is a good idea. The whole concept of just passing random GFP_ flags to dma_alloc_attrs / dma_alloc_coherent can't work, given that on many architectures we need to set up new page tables to remap the allocated memory, and we can't use arbitrary gfp flags for pte allocations. So instead of trying to pass them further down again we need to instead work to fix all callers of dma_alloc_attrs / dma_alloc_coherent that don't just pass GFP_KERNEL.
What's the expected approach to fix callers? It's not clear how you would fix the callers for the case that prompted this series (context correctly used GFP_NOIO but it was not passed to dma_alloc_coherent) Thanks, Laura