linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	tony@atomide.com, nsekhar@ti.com, linux-omap@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Jingoo Han <jingoohan1@gmail.com>,
	Richard Zhu <Richard.Zhu@freescale.com>,
	Pratyush Anand <pratyush.anand@gmail.com>
Subject: Re: [PATCH v2] PCI: dra7xx: mark dra7xx_pcie_msi irq as IRQF_NO_THREAD
Date: Tue, 08 Dec 2015 10:23:50 +0100	[thread overview]
Message-ID: <1449566630.3118.10.camel@pengutronix.de> (raw)
In-Reply-To: <20151208033300.GA1255@localhost>

Hi Bjorn,

Am Montag, den 07.12.2015, 21:33 -0600 schrieb Bjorn Helgaas:
> [+cc Jingoo (exynos), Richard, Lucas (imx6), Pratyush (spear13xx)]
> 
> On Fri, Dec 04, 2015 at 11:22:50PM +0200, Grygorii Strashko wrote:
> > On 12/04/2015 08:46 PM, Bjorn Helgaas wrote:
> > > Hi Grygorii,
[...]
> > >>   
> > >> +	/*
> > >> +	 * Mark dra7xx_pcie_msi IRQ as IRQF_NO_THREAD
> > >> +	 * On -RT and if kernel is booting with "threadirqs" cmd line parameter
> > >> +	 * the dra7xx_pcie_msi_irq_handler() will be forced threaded but,
> > >> +	 * in the same time, it's IRQ dispatcher and calls generic_handle_irq(),
> > >> +	 * which, in turn, will be resolved to handle_simple_irq() call.
> > >> +	 * The handle_simple_irq() expected to be called with IRQ disabled, as
> > >> +	 * result kernle will display warning:
> > >> +	 * "irq XXX handler YYY+0x0/0x14 enabled interrupts".
> > >> +	 */
> > >>   	ret = devm_request_irq(&pdev->dev, pp->irq,
> > >> -			       dra7xx_pcie_msi_irq_handler, IRQF_SHARED,
> > >> +			       dra7xx_pcie_msi_irq_handler,
> > >> +			       IRQF_SHARED | IRQF_NO_THREAD,
> > >>   			       "dra7-pcie-msi",	pp);
> > > 
> > > There's similar code in exynos_add_pcie_port(), imx6_add_pcie_port(),
> > > and spear13xx_add_pcie_port().  Do they need similar changes?  If not,
> > > why not?
> > > 
> > > I see your discussion about DRA7 hardware design, but my impression is
> > > that this problem affects anybody who calls dw_handle_msi_irq() from a
> > > handler registered with IRQF_SHARED.
> > 
> > Issue fixed by this patch is not related to IRQF_SHARED. 
> > It will happen on -RT or if kernel will boot with "threadirqs" cmd line parameter
> > - in both cases these PCI IRQ handlers will be forced to be threaded and,
> > as result, generic_handle_irq() will produce above backtrace.
> > 
> > Personally, I don't have strong opinion about "should similar change be applied
> > to other PCI drivers or not?" And I think, that owners of those driver should
> > make such decision.
> 
> If the same issue affects several drivers, I'd like to see them all
> handle it the same way.  Otherwise, somebody coming along later will
> wonder why they're different, and there won't be a good answer.
> 
> I cc'd the other maintainers to see what they think.
> 
Yes, this should absolutely be changed in all drivers, based on the DW
core. There were some patches for this already, but apparently they have
not been applied, because some review feedback wasn't taken care of.

I have a patch titled "PCI: designware: Mark the msi cascade handler
IRQF_NO_THREAD" in my inbox that did this, and I still think it's the
right thing to do.

Regards,
Lucas

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

  reply	other threads:[~2015-12-08  9:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 13:59 [PATCH v2] PCI: dra7xx: mark dra7xx_pcie_msi irq as IRQF_NO_THREAD Grygorii Strashko
2015-12-04 18:46 ` Bjorn Helgaas
2015-12-04 21:22   ` Grygorii Strashko
2015-12-08  3:33     ` Bjorn Helgaas
2015-12-08  9:23       ` Lucas Stach [this message]
2015-12-09  4:49         ` Pratyush Anand
2015-12-08  9:05   ` Sebastian Andrzej Siewior
2015-12-09 15:24     ` Bjorn Helgaas
2015-12-09 19:38       ` Grygorii Strashko

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=1449566630.3118.10.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=Richard.Zhu@freescale.com \
    --cc=bhelgaas@google.com \
    --cc=bigeasy@linutronix.de \
    --cc=grygorii.strashko@ti.com \
    --cc=helgaas@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=pratyush.anand@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).