}
WARN_ON_ONCE(1);
}
-@@ -50,15 +50,14 @@ u64 dma_direct_get_required_mask(struct
+@@ -51,15 +51,14 @@ u64 dma_direct_get_required_mask(struct
}
static gfp_t __dma_direct_optimal_gfp_mask(struct device *dev, u64 dma_mask,
/*
* Optimistically try the zone that the physical address mask falls
-@@ -68,9 +67,9 @@ static gfp_t __dma_direct_optimal_gfp_ma
+@@ -69,9 +68,9 @@ static gfp_t __dma_direct_optimal_gfp_ma
* Note that GFP_DMA32 and GFP_DMA are no ops without the corresponding
* zones.
*/
return GFP_DMA32;
return 0;
}
-@@ -78,7 +77,7 @@ static gfp_t __dma_direct_optimal_gfp_ma
+@@ -79,7 +78,7 @@ static gfp_t __dma_direct_optimal_gfp_ma
static bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size)
{
return phys_to_dma_direct(dev, phys) + size - 1 <=
}
struct page *__dma_direct_alloc_pages(struct device *dev, size_t size,
-@@ -87,7 +86,7 @@ struct page *__dma_direct_alloc_pages(st
+@@ -88,7 +87,7 @@ struct page *__dma_direct_alloc_pages(st
size_t alloc_size = PAGE_ALIGN(size);
int node = dev_to_node(dev);
struct page *page = NULL;
if (attrs & DMA_ATTR_NO_WARN)
gfp |= __GFP_NOWARN;
-@@ -95,7 +94,7 @@ struct page *__dma_direct_alloc_pages(st
+@@ -96,7 +95,7 @@ struct page *__dma_direct_alloc_pages(st
/* we always manually zero the memory once we are done: */
gfp &= ~__GFP_ZERO;
gfp |= __dma_direct_optimal_gfp_mask(dev, dev->coherent_dma_mask,
page = dma_alloc_contiguous(dev, alloc_size, gfp);
if (page && !dma_coherent_ok(dev, page_to_phys(page), size)) {
dma_free_contiguous(dev, page, alloc_size);
-@@ -109,7 +108,7 @@ again:
+@@ -110,7 +109,7 @@ again:
page = NULL;
if (IS_ENABLED(CONFIG_ZONE_DMA32) &&