LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] swiotlb: Silent unwanted warning "buffer is full"
@ 2018-05-03 21:54 Jean Delvare
  2018-05-12 10:02 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2018-05-03 21:54 UTC (permalink / raw)
  To: iommu
  Cc: linux-kernel, Christoph Hellwig, Christian König,
	Michel Dänzer, Takashi Iwai

If DMA_ATTR_NO_WARN is passed to swiotlb_alloc_buffer(), it should be
passed further down to swiotlb_tbl_map_single(). Otherwise we escape
half of the warnings but still log the other half.

This is one of the multiple causes of spurious warnings reported at:
https://bugs.freedesktop.org/show_bug.cgi?id=104082

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 0176adb00406 ("swiotlb: refactor coherent buffer allocation")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: stable@vger.kernel.org # v4.16
---
 lib/swiotlb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-4.16.orig/lib/swiotlb.c	2018-05-02 15:06:49.677769532 +0200
+++ linux-4.16/lib/swiotlb.c	2018-05-03 15:04:27.136921225 +0200
@@ -727,7 +727,7 @@ swiotlb_alloc_buffer(struct device *dev,
 
 	phys_addr = swiotlb_tbl_map_single(dev,
 			swiotlb_phys_to_dma(dev, io_tlb_start),
-			0, size, DMA_FROM_DEVICE, 0);
+			0, size, DMA_FROM_DEVICE, attrs);
 	if (phys_addr == SWIOTLB_MAP_ERROR)
 		goto out_warn;
 


-- 
Jean Delvare
SUSE L3 Support

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

end of thread, other threads:[~2018-05-13  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 21:54 [PATCH] swiotlb: Silent unwanted warning "buffer is full" Jean Delvare
2018-05-12 10:02 ` Christoph Hellwig
2018-05-13  8:35   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).