From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "Thorsten Scherer" <t.scherer@eckelmann.de>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <bgolaszewski@baylibre.com>
Cc: tglx@linutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] gpio: siox: explicitly support only threaded irqs
Date: Mon, 7 Sep 2020 17:31:35 +0200 [thread overview]
Message-ID: <20200907153135.3307-1-a.fatoum@pengutronix.de> (raw)
The gpio-siox driver uses handle_nested_irq() to implement its
interrupt support. This is only capable of handling threaded irq
actions. For a hardirq action it triggers a NULL pointer oops.
(It calls action->thread_fn which is NULL then.)
Prevent registration of a hardirq action by setting
gpio_irq_chip::threaded to true.
Cc: u.kleine-koenig@pengutronix.de
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
reworded commit message (Uwe)
---
drivers/gpio/gpio-siox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c
index 26e1fe092304..f8c5e9fc4bac 100644
--- a/drivers/gpio/gpio-siox.c
+++ b/drivers/gpio/gpio-siox.c
@@ -245,6 +245,7 @@ static int gpio_siox_probe(struct siox_device *sdevice)
girq->chip = &ddata->ichip;
girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq;
+ girq->threaded = true;
ret = devm_gpiochip_add_data(dev, &ddata->gchip, NULL);
if (ret)
--
2.28.0
next reply other threads:[~2020-09-07 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 15:31 Ahmad Fatoum [this message]
2020-09-07 16:15 ` [PATCH v2] gpio: siox: explicitly support only threaded irqs Uwe Kleine-König
2020-09-09 9:43 ` Bartosz Golaszewski
2020-09-09 10:30 ` Uwe Kleine-König
2020-09-09 11:00 ` Bartosz Golaszewski
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=20200907153135.3307-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=bgolaszewski@baylibre.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=t.scherer@eckelmann.de \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@pengutronix.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).