linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Julia Cartwright <julia@ni.com>
Cc: Lionel DEBIEVE <lionel.debieve@st.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH RT 1/1] remoteproc: Prevent schedule while atomic
Date: Tue, 28 Mar 2017 10:31:56 +0100	[thread overview]
Message-ID: <20170328093156.llkv6h6dyk5lwifx@dell> (raw)
In-Reply-To: <20170323205154.GP10423@jcartwri.amer.corp.natinst.com>

On Thu, 23 Mar 2017, Julia Cartwright wrote:

> On Thu, Mar 23, 2017 at 10:26:49AM +0000, Lee Jones wrote:
> > On Thu, 23 Mar 2017, Lionel DEBIEVE wrote:
> > 
> > > On 03/22/2017 07:47 PM, Julia Cartwright wrote:
> > > > On Wed, Mar 22, 2017 at 01:30:12PM -0500, Grygorii Strashko wrote:
> > > >> On 03/22/2017 01:01 PM, Steven Rostedt wrote:
> > > >>> On Wed, 22 Mar 2017 12:37:59 -0500
> > > >>> Julia Cartwright <julia@ni.com> wrote:
> > > >>>
> > > >>>> Which kernel were you testing on, here?  From what I can tell, this
> > > >>>> should have been fixed with Thomas's commit:
> > > >>>>
> > > >>>>     2a1d3ab8986d ("genirq: Handle force threading of irqs with primary
> > > >>>> and thread handler")
> > > >>> Thanks Julia for looking into this. I just looked at the code, and saw
> > > >>> that it does very little with the lock held, and was fine with the
> > > >>> conversion. But if that interrupt handler should be in a thread, we
> > > >>> should see if that's the issue first.
> > > >>
> > > >> It will not be threaded because there are IRQF_ONESHOT used.
> > > >>
> > > >> 	ret = devm_request_threaded_irq(&pdev->dev, irq,
> > > >> 					sti_mbox_irq_handler,
> > > >> 					sti_mbox_thread_handler,
> > > >> 					IRQF_ONESHOT, mdev->name, mdev);
> > > > Indeed.  I had skipped over this important detail when I was skimming
> > > > through the code.
> > > >
> > > > Thanks for clarifying!
> > > >
> > > > Is IRQF_ONESHOT really necessary for this device?  The primary handler
> > > > invokes sti_mbox_disable_channel() on the interrupting channel, which I
> > > > would hope would acquiesce the pending interrupt at the device-level?
> > 
> > Not sure.  This part of the code is remanent from when I re-wrote it.
> > 
> > What is the alternative?
> 
> If, on the completed execution of the registered primary handler, you
> can ensure that the device is no longer asserting an interrupt to the
> connected irq chip, then the IRQF_ONESHOT isn't necessary, because it's
> safe for the irq core to unmask the interrupt after the primary handler
> runs.
> 
> It appears that it might be able to make this guarantee, if that's what
> sti_mbox_disable_channel() is doing.

Yes, I'm inclined to agree.

> > NB: What does 'acquiesce' mean in this context?  Is that a typo?
> 
> I mean 'acquiesce' to mean what I mention before: prevent the device
> from asserting the interrupt.  Perhaps it's a uncommon use of the word.

http://www.thesaurus.com/browse/acquiesce

Perhaps 'suppress' or 'quell' would better suit the situation.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2017-03-28  9:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 15:18 [PATCH RT 1/1] remoteproc: Prevent schedule while atomic Lionel Debieve
2017-03-22 16:05 ` Steven Rostedt
2017-03-22 17:15   ` Lionel DEBIEVE
2017-03-29 16:06   ` Sebastian Andrzej Siewior
2017-03-30  7:54     ` Lee Jones
2017-04-04  8:33       ` Lionel DEBIEVE
2017-03-22 17:37 ` Julia Cartwright
2017-03-22 18:01   ` Steven Rostedt
2017-03-22 18:30     ` Grygorii Strashko
2017-03-22 18:47       ` Julia Cartwright
2017-03-23  8:28         ` Lionel DEBIEVE
2017-03-23 10:26           ` Lee Jones
2017-03-23 20:51             ` Julia Cartwright
2017-03-28  9:31               ` Lee Jones [this message]
2017-03-24  8:38         ` Thomas Gleixner

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=20170328093156.llkv6h6dyk5lwifx@dell \
    --to=lee.jones@linaro.org \
    --cc=bigeasy@linutronix.de \
    --cc=grygorii.strashko@ti.com \
    --cc=julia@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=lionel.debieve@st.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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).