From: Jason Cooper <jason@lakedaemon.net>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <marc.zyngier@arm.com>, Suman Anna <s-anna@ti.com>,
linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Sam Nelson <sam.nelson@ti.com>,
bigeasy@linutronix.de
Subject: Re: [PATCH] irqchip: keystone: Fix "scheduling while atomic" on rt
Date: Sat, 31 Dec 2016 19:04:49 +0000 [thread overview]
Message-ID: <20161231190449.GG30137@io.lakedaemon.net> (raw)
In-Reply-To: <20161208233310.10329-1-grygorii.strashko@ti.com>
Hi Grygorii,
On Thu, Dec 08, 2016 at 05:33:10PM -0600, Grygorii Strashko wrote:
> From: "Strashko, Grygorii" <grygorii.strashko@ti.com>
>
> The below call chain generates "scheduling while atomic" backtrace and
> causes system crash when Keystone 2 IRQ chip driver is used with RT-kernel:
>
> gic_handle_irq()
> |-__handle_domain_irq()
> |-generic_handle_irq()
> |-keystone_irq_handler()
> |-regmap_read()
> |-regmap_lock_spinlock()
> |-rt_spin_lock()
>
> The reason is that Keystone driver dispatches IRQ using chained IRQ handler
> and accesses I/O memory through syscon->regmap(mmio) which is implemented
> as fast_io regmap and uses regular spinlocks for synchronization, but
> spinlocks transformed to rt_mutexes on RT.
>
> Hence, convert Keystone 2 IRQ driver to use generic irq handler instead of
> chained IRQ handler. This way it will be compatible with RT kernel where it
> will be forced thread IRQ handler while in non-RT kernel it still will be
> executed in HW IRQ context.
>
> Cc: Suman Anna <s-anna@ti.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> Hi,
>
> In general, there is an option to convert this driver to use nested threaded
> irq handlers (this should not affect our current user of these irqs from
> performance point of view), but that will affect on our current remoteproc and
> UIO based drivers (including uio core) which do not expect to use threaded
> irq and use request_irq(). These drivers and UIO core might require to be
> updated to use threaded irqs and (or) request_any_context_irq().
>
> Suman, what do you think?
>
> drivers/irqchip/irq-keystone.c | 28 +++++++++++++++++++---------
> 1 file changed, 19 insertions(+), 9 deletions(-)
Applied to irqchip/urgent with Suman's Tested-by.
thx,
Jason.
next prev parent reply other threads:[~2016-12-31 19:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 23:33 [PATCH] irqchip: keystone: Fix "scheduling while atomic" on rt Grygorii Strashko
2016-12-24 1:34 ` Suman Anna
2016-12-31 19:04 ` Jason Cooper [this message]
2017-01-25 17:20 ` Sebastian Andrzej Siewior
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=20161231190449.GG30137@io.lakedaemon.net \
--to=jason@lakedaemon.net \
--cc=bigeasy@linutronix.de \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=s-anna@ti.com \
--cc=sam.nelson@ti.com \
--cc=ssantosh@kernel.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).