All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: iommu@lists.linux-foundation.org, Christoph Hellwig <hch@lst.de>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 2/2] dma-direct: improve DMA mask overflow reporting
Date: Tue, 4 Feb 2020 16:58:45 +0100	[thread overview]
Message-ID: <20200204155845.GA8839@lst.de> (raw)
In-Reply-To: <b4ff1d6c-6dcb-3f7b-3935-451bdbffdcc3@arm.com>

On Tue, Feb 04, 2020 at 03:14:06PM +0000, Robin Murphy wrote:
>> @@ -371,7 +359,10 @@ dma_addr_t dma_direct_map_page(struct device *dev, struct page *page,
>>   		if (swiotlb_force != SWIOTLB_NO_FORCE)
>>   			return swiotlb_map(dev, phys, size, dir, attrs);
>>   -		report_addr(dev, dma_addr, size);
>> +		dev_err_once(dev,
>> +			     "DMA addr %pad+%zu overflow (mask %llx, bus limit %llx).\n",
>> +			     &dma_addr, size, *dev->dma_mask, dev->bus_dma_limit);
>> +		WARN_ON_ONCE(1);
>
> Or even dev_WARN_ONCE() to make them even simpler?

It looks like dev_WARN_ONCE supports format strings (unlike
WARN_ON_ONCE), so that sounds fine.  If there are no other comments
coming in I'll apply the patches with that change.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

      reply	other threads:[~2020-02-04 15:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  6:32 improve dma-direct / swiotlb error reporting Christoph Hellwig
2020-02-04  6:32 ` [PATCH 1/2] dma-direct: improve " Christoph Hellwig
2020-02-04 14:54   ` Konrad Rzeszutek Wilk
2020-02-04  6:32 ` [PATCH 2/2] dma-direct: improve DMA mask overflow reporting Christoph Hellwig
2020-02-04 14:55   ` Konrad Rzeszutek Wilk
2020-02-04 15:14   ` Robin Murphy
2020-02-04 15:58     ` Christoph Hellwig [this message]

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=20200204155845.GA8839@lst.de \
    --to=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=robin.murphy@arm.com \
    /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.