From: Christoph Hellwig <hch@lst.de>
To: Sibren Vasse <sibren@sibrenvasse.nl>
Cc: "Sibren Vasse" <freedesktop@sibrenvasse.nl>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"Michel Dänzer" <michel@daenzer.net>,
x86@kernel.org, dri-devel@lists.freedesktop.org,
christian.koenig@amd.com, iommu@lists.linux-foundation.org,
amd-gfx@lists.freedesktop.org,
"Robin Murphy" <robin.murphy@arm.com>,
"Christoph Hellwig" <hch@lst.de>,
"Marek Szyprowski" <m.szyprowski@samsung.com>
Subject: Re: amdgpu/TTM oopses since merging swiotlb_dma_ops into the dma_direct code
Date: Mon, 14 Jan 2019 19:10:41 +0100 [thread overview]
Message-ID: <20190114181041.GB8897@lst.de> (raw)
In-Reply-To: <CAF=iVcsEMfWyJck7RJ8-EGvKipXU=5eq3iv61mo49_7Wd4pHuw@mail.gmail.com>
On Thu, Jan 10, 2019 at 06:52:26PM +0100, Sibren Vasse wrote:
> On Thu, 10 Jan 2019 at 15:48, Christoph Hellwig <hch@lst.de> wrote:
> >
> > On Thu, Jan 10, 2019 at 03:00:31PM +0100, Christian König wrote:
> > >> From the trace it looks like we git the case where swiotlb tries
> > >> to copy back data from a bounce buffer, but hits a dangling or NULL
> > >> pointer. So a couple questions for the submitter:
> > >>
> > >> - does the system have more than 4GB memory and thus use swiotlb?
> > >> (check /proc/meminfo, and if something SWIOTLB appears in dmesg)
> > >> - does the device this happens on have a DMA mask smaller than
> > >> the available memory, that is should swiotlb be used here to start
> > >> with?
> > >
> > > Rather unlikely. The device is an AMD GPU, so we can address memory up to
> > > 1TB.
> >
> > So we probably somehow got a false positive.
> >
> > For now I'like the reported to confirm that the dma_direct_unmap_page+0x92
> > backtrace really is in the swiotlb code (I can't think of anything else,
> > but I'd rather be sure).
> I'm not sure what you want me to confirm. Could you elaborate?
Please open the vmlinux file for which this happend in gdb,
then send the output from this command
l *(dma_direct_unmap_page+0x92)
to this thread.
> > Second it would be great to print what the contents of io_tlb_start
> > and io_tlb_end are, e.g. by doing a printk_once in is_swiotlb_buffer,
> > maybe that gives a clue why we are hitting the swiotlb code here.
>
> diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
> index 7c007ed7505f..042246dbae00 100644
> --- a/include/linux/swiotlb.h
> +++ b/include/linux/swiotlb.h
> @@ -69,6 +69,7 @@ extern phys_addr_t io_tlb_start, io_tlb_end;
>
> static inline bool is_swiotlb_buffer(phys_addr_t paddr)
> {
> + printk_once(KERN_INFO "io_tlb_start: %llu, io_tlb_end: %llu",
> io_tlb_start, io_tlb_end);
> return paddr >= io_tlb_start && paddr < io_tlb_end;
> }
>
> Result on boot:
> [ 11.405558] io_tlb_start: 3782983680, io_tlb_end: 3850092544
So this is a normal swiotlb location, and it does defintively exist.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-01-14 18:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 9:59 amdgpu/TTM oopses since merging swiotlb_dma_ops into the dma_direct code Michel Dänzer
2019-01-10 13:57 ` Christoph Hellwig
2019-01-10 14:00 ` Christian König
[not found] ` <a3f0fd49-2286-ee2a-f0e8-dfe82aac73fb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-01-10 14:48 ` Christoph Hellwig
[not found] ` <20190110144837.GA10362-jcswGhMUV9g@public.gmane.org>
2019-01-10 17:52 ` Sibren Vasse
2019-01-14 18:10 ` Christoph Hellwig [this message]
[not found] ` <20190114181041.GB8897-jcswGhMUV9g@public.gmane.org>
2019-01-14 19:00 ` Sibren Vasse
2019-01-14 17:22 ` Michel Dänzer
[not found] ` <20190110135741.GA9255-jcswGhMUV9g@public.gmane.org>
2019-01-10 15:26 ` Sibren Vasse
[not found] ` <CAF=iVctGGs1OzHBg6MgpxrFbT_19T4YvH8muBZtsLJBDwGhrvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-01-10 17:05 ` Konrad Rzeszutek Wilk
[not found] ` <20190110170557.GD27546-he5eyhs8q0BAdwtm4QZOy9BPR1lH4CV8@public.gmane.org>
2019-01-10 17:34 ` Sibren Vasse
2019-01-14 18:13 ` Christoph Hellwig
[not found] ` <20190114181314.GC8897-jcswGhMUV9g@public.gmane.org>
2019-01-14 19:32 ` Sibren Vasse
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=20190114181041.GB8897@lst.de \
--to=hch@lst.de \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedesktop@sibrenvasse.nl \
--cc=iommu@lists.linux-foundation.org \
--cc=konrad.wilk@oracle.com \
--cc=m.szyprowski@samsung.com \
--cc=michel@daenzer.net \
--cc=robin.murphy@arm.com \
--cc=sibren@sibrenvasse.nl \
--cc=x86@kernel.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