All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torsten Duwe <duwe@lst.de>
To: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, jthumshirn@suse.com
Subject: Re: [PATCH] powerpc: add kernel parameter iommu_alloc_quiet
Date: Thu, 1 Sep 2016 15:39:37 +0200	[thread overview]
Message-ID: <20160901133937.GA8644@lst.de> (raw)
In-Reply-To: <1472734602-14330-1-git-send-email-mauricfo@linux.vnet.ibm.com>

On Thu, Sep 01, 2016 at 09:56:42AM -0300, Mauricio Faria de Oliveira wrote:
> This patch introduces the 'iommu_alloc_quiet=driver_name' parameter
> to suppress the 'iommu_alloc failures' messages for that one driver.
> 
> This is an additional approach for this 'problem' of flooding logs,
> not as fine-grained and not enabled by default as DMA_ATTR_NO_WARN,
> but it has the advantage that it doesn't introduce any ABI changes.
> 
> That is important/requirement for the distribution kernels - where
> the DMA_ATTR_NO_WARN changes to 'enum dma_attr' are not acceptable
> because it breaks the kernel ABI.
> 
[...]
> @@ -479,8 +496,8 @@ int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl,
>  
>  		/* Handle failure */
>  		if (unlikely(entry == DMA_ERROR_CODE)) {
> -			if (!(attrs & DMA_ATTR_NO_WARN) &&
> -			    printk_ratelimit())
> +			if (strncmp(iommu_alloc_quiet, dev->driver->name, IOMMU_ALLOC_QUIET_LEN) &&
> +			    !(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit())
>  				dev_info(dev, "iommu_alloc failed, tbl %p "
>  					 "vaddr %lx npages %lu\n", tbl, vaddr,
>  					 npages);
> @@ -777,8 +794,8 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl,
>  					 mask >> tbl->it_page_shift, align,
>  					 attrs);
>  		if (dma_handle == DMA_ERROR_CODE) {
> -			if (!(attrs & DMA_ATTR_NO_WARN) &&
> -			    printk_ratelimit())  {
> +			if (strncmp(iommu_alloc_quiet, dev->driver->name, IOMMU_ALLOC_QUIET_LEN) &&
> +			    !(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit()) {
>  				dev_info(dev, "iommu_alloc failed, tbl %p "
>  					 "vaddr %p npages %d\n", tbl, vaddr,
>  					 npages);

JFYI, my strongly preferred solution would still be to just dev_dbg() the whole thing.
Which group of people would be interested in these messages, after all?

	Torsten

  parent reply	other threads:[~2016-09-01 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 12:56 [PATCH] powerpc: add kernel parameter iommu_alloc_quiet Mauricio Faria de Oliveira
2016-09-01 13:32 ` Mauricio Faria de Oliveira
2016-09-01 13:39 ` Torsten Duwe [this message]
2016-09-01 14:26   ` Mauricio Faria de Oliveira
2016-09-21 13:51 ` Michael Ellerman
2016-09-21 14:34   ` Mauricio Faria de Oliveira
2016-10-03 15:44     ` Mauricio Faria de Oliveira

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=20160901133937.GA8644@lst.de \
    --to=duwe@lst.de \
    --cc=jthumshirn@suse.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mauricfo@linux.vnet.ibm.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.