From: Mike Galbraith <efault@gmx.de>
To: nouveau <nouveau@lists.freedesktop.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ben Skeggs <bskeggs@redhat.com>,
Christian Koenig <christian.koenig@amd.com>,
Roger He <Hongbo.He@amd.com>, Christoph Hellwig <hch@lst.de>
Subject: [patch] swiotlb: fix ignored DMA_ATTR_NO_WARN request
Date: Fri, 11 May 2018 17:15:30 +0200 [thread overview]
Message-ID: <1526051730.23162.3.camel@gmx.de> (raw)
In-Reply-To: <1526022830.6288.3.camel@gmx.de>
In the trace below, swiotlb_alloc() is called with __GFP_NOWARN, it ors
attrs with DMA_ATTR_NO_WARN and passes it to swiotlb_alloc_buffer(),
which does NOT pass it on to swiotlb_tbl_map_single(), leading to an
ever repeating warning that the caller of swiotlb_alloc() explicitly
asked to be squelched. Pass the caller's request for silence onward.
Xorg-3170 [006] .... 963.866098: swiotlb_alloc+0x1d/0x1a0: gfp & __GFP_NOWARN
Xorg-3170 [006] .... 963.866101: <stack trace>
=> ttm_dma_populate+0x250/0x310 [ttm]
=> ttm_tt_populate+0x28/0x70 [ttm]
=> ttm_tt_bind+0x26/0x60 [ttm]
=> ttm_bo_handle_move_mem+0x51a/0x580 [ttm]
=> ttm_bo_validate+0xfa/0x110 [ttm]
=> ttm_bo_init_reserved+0x296/0x450 [ttm]
=> ttm_bo_init+0x73/0xd0 [ttm]
=> nouveau_bo_new+0x3eb/0x5c0 [nouveau]
=> nouveau_gem_new+0x66/0x110 [nouveau]
=> nouveau_gem_ioctl_new+0x48/0xc0 [nouveau]
=> drm_ioctl_kernel+0x66/0xb0 [drm]
=> drm_ioctl+0x28d/0x340 [drm]
=> nouveau_drm_ioctl+0x50/0xb0 [nouveau]
=> do_vfs_ioctl+0x92/0x5e0
=> ksys_ioctl+0x3a/0x70
=> __x64_sys_ioctl+0x16/0x20
=> do_syscall_64+0x5b/0x180
=> entry_SYSCALL_64_after_hwframe+0x44/0xa9
Xorg-3170 [006] .... 963.866917: swiotlb_tbl_map_single+0x29b/0x2d0: swiotlb buffer is full (sz: 2097152 bytes)
Signed-off-by: Mike Galbraith <efault@gmx.de>
---
lib/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -714,7 +714,7 @@ swiotlb_alloc_buffer(struct device *dev,
phys_addr = swiotlb_tbl_map_single(dev,
__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;
next prev parent reply other threads:[~2018-05-11 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 9:10 kernel spew from nouveau/ swiotlb Mike Galbraith
2018-05-10 10:28 ` Mike Galbraith
2018-05-11 7:13 ` Mike Galbraith
2018-05-11 15:15 ` Mike Galbraith [this message]
2018-05-12 7:11 ` [patch] swiotlb: fix ignored DMA_ATTR_NO_WARN request Mike Galbraith
2018-05-10 14:31 ` [Nouveau] kernel spew from nouveau/ swiotlb Jerome Glisse
2018-05-10 15:31 ` Mike Galbraith
2018-05-10 16:30 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1526051730.23162.3.camel@gmx.de \
--to=efault@gmx.de \
--cc=Hongbo.He@amd.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox