From: Andrew Morton <akpm@linux-foundation.org>
To: shuah.khan@hp.com
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: Tue, 9 Oct 2012 14:06:05 -0700 [thread overview]
Message-ID: <20121009140605.68b4e6c5.akpm@linux-foundation.org> (raw)
In-Reply-To: <1349716086.2674.20.camel@lorien2>
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.
next prev parent reply other threads:[~2012-10-09 21:06 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 [this message]
2012-10-10 14:59 ` Shuah Khan
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=20121009140605.68b4e6c5.akpm@linux-foundation.org \
--to=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=shuah.khan@hp.com \
--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