aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/pci-dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index c5ef1af8e79d..069e843f0b93 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -397,9 +397,6 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
397 if (dev->dma_mask == NULL) 397 if (dev->dma_mask == NULL)
398 return NULL; 398 return NULL;
399 399
400 /* Don't invoke OOM killer */
401 gfp |= __GFP_NORETRY;
402
403#ifdef CONFIG_X86_64 400#ifdef CONFIG_X86_64
404 /* Why <=? Even when the mask is smaller than 4GB it is often 401 /* Why <=? Even when the mask is smaller than 4GB it is often
405 larger than 16MB and in this case we have a chance of 402 larger than 16MB and in this case we have a chance of
@@ -410,7 +407,9 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
410#endif 407#endif
411 408
412 again: 409 again:
413 page = dma_alloc_pages(dev, gfp, get_order(size)); 410 /* Don't invoke OOM killer or retry in lower 16MB DMA zone */
411 page = dma_alloc_pages(dev,
412 (gfp & GFP_DMA) ? gfp | __GFP_NORETRY : gfp, get_order(size));
414 if (page == NULL) 413 if (page == NULL)
415 return NULL; 414 return NULL;
416 415