From: Shuah Khan <shuah.khan@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: konrad.wilk@oracle.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, rob@landley.net, stern@rowland.harvard.edu,
joerg.roedel@amd.com, bhelgaas@google.com,
LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org, devel@linuxdriverproject.org,
x86@kernel.org, shuahkhan@gmail.com
Subject: Re: [PATCH v5] dma-debug: New interfaces to debug dma mapping errors
Date: Wed, 10 Oct 2012 08:59:27 -0600 [thread overview]
Message-ID: <1349881167.2702.18.camel@lorien2> (raw)
In-Reply-To: <20121009140605.68b4e6c5.akpm@linux-foundation.org>
On Tue, 2012-10-09 at 14:06 -0700, Andrew Morton wrote:
> On Mon, 08 Oct 2012 11:08:06 -0600
> Shuah Khan <shuah.khan@hp.com> wrote:
>
> > Add dma-debug interface debug_dma_mapping_error() to debug drivers that fail
> > to check dma mapping errors on addresses returned by dma_map_single() and
> > dma_map_page() interfaces. This interface clears a flag set by
> > debug_dma_map_page() to indicate that dma_mapping_error() has been called by
> > the driver. When driver does unmap, debug_dma_unmap() checks the flag and if
> > this flag is still set, prints warning message that includes call trace that
> > leads up to the unmap. This interface can be called from dma_mapping_error()
> > routines to enable dma mapping error check debugging.
> >
> > Tested: Intel iommu and swiotlb (iommu=soft) on x86-64 with
> > CONFIG_DMA_API_DEBUG enabled and disabled.
> >
> > Signed-off-by: Shuah Khan <shuah.khan@hp.com>
> > ---
> > Documentation/DMA-API.txt | 12 ++++++
> > arch/x86/include/asm/dma-mapping.h | 1 +
> > include/linux/dma-debug.h | 7 ++++
> > lib/dma-debug.c | 71 ++++++++++++++++++++++++++++++++++--
>
> Third time lucky ... we still haven't fixed Documentation/DMA-API-HOWTO.txt!
>
> Please, go through it and update it to show people how to correctly use
> these APIs.
Yes. Still on my list. I am working on the documentation changes. I am
planning to add usage examples that include calls to dma_mapping_error()
after dma_map_[page/single] calls and programming mistakes to watch out
for such as missing unmaps from error legs etc.
-- Shuah
next prev parent reply other threads:[~2012-10-10 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 17:08 [PATCH v5] dma-debug: New interfaces to debug dma mapping errors Shuah Khan
2012-10-09 17:12 ` Konrad Rzeszutek Wilk
2012-10-09 17:26 ` Shuah Khan
2012-10-09 21:06 ` Andrew Morton
2012-10-10 14:59 ` Shuah Khan [this message]
2012-10-24 15:08 ` Joerg Roedel
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=1349881167.2702.18.camel@lorien2 \
--to=shuah.khan@hp.com \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=devel@linuxdriverproject.org \
--cc=hpa@zytor.com \
--cc=joerg.roedel@amd.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rob@landley.net \
--cc=shuahkhan@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--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