From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Julia Cartwright <julia@ni.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Brian Wrenn <dcbrianw@gmail.com>,
linux-rt-users@vger.kernel.org,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"open list:ARM/QUALCOMM SUPPORT" <linux-soc@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>
Subject: Re: [PATCH] pinctrl: qcom: Use raw spinlock variants
Date: Fri, 20 Jan 2017 10:04:40 -0800 [thread overview]
Message-ID: <20170120180440.GY10531@minitux> (raw)
In-Reply-To: <20170120161347.GI1335@jcartwri.amer.corp.natinst.com>
On Fri 20 Jan 08:13 PST 2017, Julia Cartwright wrote:
> The MSM pinctrl driver currently implements an irq_chip for handling
> GPIO interrupts; due to how irq_chip handling is done, it's necessary
> for the irq_chip methods to be invoked from hardirq context, even on a
> a real-time kernel. Because the spinlock_t type becomes a "sleeping"
> spinlock w/ RT kernels, it is not suitable to be used with irq_chips.
>
Thanks for the explanation.
> A quick audit of the operations under the lock reveal that they do only
> minimal, bounded work, and are therefore safe to do under a raw
> spinlock.
>
I agree with this conclusion.
> On real-time kernels, this fixes an OOPs which looks like the following,
> as reported by Brian Wrenn:
>
> kernel BUG at kernel/locking/rtmutex.c:1014!
> Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
> Modules linked in: spidev_irq(O) smsc75xx wcn36xx [last unloaded: spidev]
> CPU: 0 PID: 1163 Comm: irq/144-mmc0 Tainted: G W O 4.4.9-linaro-lt-qcom #1
> PC is at rt_spin_lock_slowlock+0x80/0x2d8
> LR is at rt_spin_lock_slowlock+0x68/0x2d8
> [..]
> Call trace:
> rt_spin_lock_slowlock
> rt_spin_lock
> msm_gpio_irq_ack
> handle_edge_irq
> generic_handle_irq
> msm_gpio_irq_handler
> generic_handle_irq
> __handle_domain_irq
> gic_handle_irq
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
next prev parent reply other threads:[~2017-01-20 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEYdEeQ63HZzi8yJk4eAAa=XeEeOFR_wqnL_PW3d6Nt5N955pQ@mail.gmail.com>
2017-01-17 20:19 ` Crash in kernel/locking/rtmutex.c Julia Cartwright
2017-01-18 8:49 ` Linus Walleij
2017-01-18 16:39 ` Brian Wrenn
2017-01-20 6:45 ` Brian Wrenn
2017-01-20 16:13 ` [PATCH] pinctrl: qcom: Use raw spinlock variants Julia Cartwright
2017-01-20 17:07 ` Brian Wrenn
2017-01-20 18:04 ` Bjorn Andersson [this message]
2017-01-26 10:08 ` Linus Walleij
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=20170120180440.GY10531@minitux \
--to=bjorn.andersson@linaro.org \
--cc=andy.gross@linaro.org \
--cc=david.brown@linaro.org \
--cc=dcbrianw@gmail.com \
--cc=julia@ni.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
/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).