All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Shuah Khan <shuah.khan@hp.com>
Cc: konrad.wilk@oracle.com, joerg.roedel@amd.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, rob@landley.net,
	akpm@linux-foundation.org, bhelgaas@google.com,
	stern@rowland.harvard.edu, shuahkhan@gmail.com,
	devel@linuxdriverproject.org, x86@kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors
Date: Sun, 16 Sep 2012 19:07:41 -0700	[thread overview]
Message-ID: <20120917020741.GA3841@kroah.com> (raw)
In-Reply-To: <1347843171.4370.13.camel@lorien2>

On Sun, Sep 16, 2012 at 06:52:51PM -0600, Shuah Khan wrote:
> +void debug_dma_dump_map_errors(struct device *dev, int all)
> +{
> +	if (all) {
> +		dev_info(dev,
> +			 "DMA-API: DMA map error summary:\n"
> +			 "DMA map errors returned = %d\n"
> +			 "DMA map errors not checked = %d\n"
> +			 "DMA unmap errors = %d\n"
> +			 "SWIOTLB overflow triggers = %d\n",
> +			 dev->dma_map_errors,
> +			 dev->dma_map_errors_not_checked,
> +			 dev->dma_unmap_errors,
> +			 dev->iotlb_overflow_cnt);
> +		return;
> +	}
> +
> +	if (dev->dma_map_errors_not_checked) {
> +		dev_err(dev,
> +			"DMA-API: Driver failed to check\n"
> +			"%d out of a total of %d DMA map errors returned\n"
> +			"by DMA mapping interfaces\n",
> +			dev->dma_map_errors_not_checked,
> +			dev->dma_map_errors);
> +	}
> +
> +	if (dev->dma_unmap_errors) {
> +		dev_err(dev,
> +			"DMA-API: Driver tried to free invalid\n"
> +			"DMA addresses %d times\n",
> +			dev->dma_unmap_errors);
> +	}
> +
> +	if (dev->iotlb_overflow_cnt) {
> +		dev_err(dev,
> +			"DMA-API: SWIOTLB overflow buffer triggered %d times\n",
> +			dev->iotlb_overflow_cnt);
> +	}
> +}
> +EXPORT_SYMBOL(debug_dma_dump_map_errors);

Don't use syslog for stuff like this, that's not good.  Why not use
debugfs?

greg k-h

  reply	other threads:[~2012-09-17  2:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17  0:52 [PATCH] dma-debug: New interfaces to debug dma mapping errors Shuah Khan
2012-09-17  2:07 ` Greg KH [this message]
2012-09-17 14:45   ` Shuah Khan
2012-09-17 15:25     ` Greg KH
2012-09-17 13:39 ` Konrad Rzeszutek Wilk
2012-09-17 15:52   ` Shuah Khan
2012-09-17 17:23     ` Konrad Rzeszutek Wilk
2012-09-17 22:45       ` Shuah Khan
2012-09-18 13:34         ` Joerg Roedel
2012-09-18 19:42           ` Shuah Khan
2012-09-18 19:45             ` Konrad Rzeszutek Wilk
2012-09-18 20:34               ` Shuah Khan
2012-09-19 13:08             ` Joerg Roedel
2012-09-19 19:16               ` Shuah Khan
2012-09-26  1:05 ` [PATCH v2] " Shuah Khan
2012-09-26 13:12   ` Konrad Rzeszutek Wilk
2012-09-26 16:23     ` Shuah Khan
2012-09-27 10:20   ` Joerg Roedel
2012-09-27 14:13     ` Shuah Khan
2012-10-03 14:55   ` [PATCH v3] " Shuah Khan
2012-10-03 21:45     ` Andrew Morton
2012-10-04 14:01       ` Konrad Rzeszutek Wilk
2012-10-04 22:16         ` Shuah Khan
2012-10-04 17:38     ` Konrad Rzeszutek Wilk
2012-10-04 22:19       ` Shuah Khan
2012-10-05  1:23     ` [PATCH v4] " Shuah Khan
2012-10-05 22:51       ` Andrew Morton
2012-10-08 17:07         ` Shuah Khan
2012-10-09 21:02           ` Andrew Morton
2012-10-10 21:50             ` Shuah Khan

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=20120917020741.GA3841@kroah.com \
    --to=greg@kroah.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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.