[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181001201257.366-3-hch@lst.de>
Date: Mon, 1 Oct 2018 13:12:57 -0700
From: Christoph Hellwig <hch@....de>
To: iommu@...ts.linux-foundation.org
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] dma-direct: respect DMA_ATTR_NO_WARN
Respect the DMA_ATTR_NO_WARN flags for allocations in dma-direct.
Signed-off-by: Christoph Hellwig <hch@....de>
---
kernel/dma/direct.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 170bd322a94a..ba6f5956a291 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -107,6 +107,9 @@ void *dma_direct_alloc_pages(struct device *dev, size_t size,
u64 phys_mask;
void *ret;
+ if (attrs & DMA_ATTR_NO_WARN)
+ gfp |= __GFP_NOWARN;
+
/* we always manually zero the memory once we are done: */
gfp &= ~__GFP_ZERO;
gfp |= __dma_direct_optimal_gfp_mask(dev, dev->coherent_dma_mask,
--
2.19.0
Powered by blists - more mailing lists