linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: "jingoohan1@gmail.com" <jingoohan1@gmail.com>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"gustavo.pimentel@synopsys.com" <gustavo.pimentel@synopsys.com>
Cc: "jpinto@synopsys.com" <jpinto@synopsys.com>,
	"marex@denx.de" <marex@denx.de>,
	"shawn.guo@linaro.org" <shawn.guo@linaro.org>,
	"pratyush.anand@st.com" <pratyush.anand@st.com>,
	"jg1.han@samsung.com" <jg1.han@samsung.com>,
	"tharvey@gateworks.com" <tharvey@gateworks.com>,
	"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
	"swarren@nvidia.com" <swarren@nvidia.com>,
	"m.mann@arkona-technologies.de" <m.mann@arkona-technologies.de>,
	"faiz_abbas@ti.com" <faiz_abbas@ti.com>,
	"mohit.kumar@st.com" <mohit.kumar@st.com>,
	"xobs@kosagi.com" <xobs@kosagi.com>,
	"siva.kallam@samsung.com" <siva.kallam@samsung.com>,
	"hrhaan@gmail.com" <hrhaan@gmail.com>,
	"jbe@pengutronix.de" <jbe@pengutronix.de>,
	"hong-xing.zhu@freescale.com" <hong-xing.zhu@freescale.com>,
	"ts.srikanth@samsung.com" <ts.srikanth@samsung.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"arnd@arndb.de" <arnd@arndb.de>
Subject: Re: [PATCH] PCI: dwc: fix MSI IRQ handler ordering
Date: Fri, 4 Jan 2019 22:45:50 +0000	[thread overview]
Message-ID: <1546641949.14247.20.camel@impinj.com> (raw)
In-Reply-To: <20190104214509.16891-1-swarren@wwwdotorg.org>

On Fri, 2019-01-04 at 14:45 -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> The current code does this when handling MSI IRQs:
> 
> a) Process the irq.
> b) Clear the latched IRQ status.
> 
> If a new IRQ occurs any time after (a) has read the IRQ status for the
> last time and before (b), it will be lost. For example, this occurs in

There was a patch series to fix this bug, sent in October, stretching
to December.

See "PCI: dwc: Fix interrupt race in when handling MSI"

And "PCI: designware: Move interrupt acking into the proper callback"

The result was more code changes, which in the end produce the same
order of operations as is done here to fix the race.  But it uses the
irq framework correctly.

I do not think this problem was introduced until 4.14, so the nvidia
4.9 must have additional patches if this is observed there.  I'm sure
it was not present in 4.12, as we used that, and did not see the issue
until updating to 4.16.

The current fix (for 4.21?) depends on significant restructuring that
was done to this driver around 4.17, see "PCI: dwc: Move MSI IRQs
allocation to IRQ domains hierarchical API".

I think my original patch ("Fix interrupt race ..") or your patch here,
which is basically the same, should be ported to 4.14 stable.  But
there are some other opinions on that.  It's not clear to me if the
hierarchical domain stuff would be back ported to stable series.  It
does not seem to me to be a good idea to do so.

  reply	other threads:[~2019-01-04 22:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 21:45 [PATCH] PCI: dwc: fix MSI IRQ handler ordering Stephen Warren
2019-01-04 22:45 ` Trent Piepho [this message]
2019-01-04 23:00   ` Stephen Warren
2019-01-04 23:23     ` Stephen Warren
2019-01-05  0:15       ` Trent Piepho
2019-01-07  9:36 ` Gustavo Pimentel
2019-01-07 17:16   ` Stephen Warren
2019-01-07 18:09     ` Gustavo Pimentel

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=1546641949.14247.20.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=faiz_abbas@ti.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=hong-xing.zhu@freescale.com \
    --cc=hrhaan@gmail.com \
    --cc=jbe@pengutronix.de \
    --cc=jg1.han@samsung.com \
    --cc=jingoohan1@gmail.com \
    --cc=jpinto@synopsys.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=m.mann@arkona-technologies.de \
    --cc=marex@denx.de \
    --cc=mohit.kumar@st.com \
    --cc=pratyush.anand@st.com \
    --cc=shawn.guo@linaro.org \
    --cc=siva.kallam@samsung.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tharvey@gateworks.com \
    --cc=ts.srikanth@samsung.com \
    --cc=xobs@kosagi.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).