mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set.
@ 2017-12-19 14:32 Christian König
  2017-12-19 14:52 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2017-12-19 14:32 UTC (permalink / raw)
  To: konrad.wilk, linux-kernel

TTM tries to allocate coherent memory in chunks of 2MB first to improve
TLB efficiency and falls back to allocating 4K pages if that fails.

Suppress the warning when the 2MB allocations fails since there is a
valid fall back path.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 lib/swiotlb.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index cea19aaf303c..63a44fb29ce6 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -769,9 +769,11 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
 	return ret;
 
 err_warn:
-	pr_warn("swiotlb: coherent allocation failed for device %s size=%zu\n",
-		dev_name(hwdev), size);
-	dump_stack();
+	if (!(flags & __GFP_NOWARN)) {
+		pr_warn("swiotlb: coherent allocation failed for device %s size=%zu\n",
+			dev_name(hwdev), size);
+		dump_stack();
+	}
 
 	return NULL;
 }
-- 
2.11.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-19 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 14:32 [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set Christian König
2017-12-19 14:52 ` Konrad Rzeszutek Wilk
2017-12-19 18:06   ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®