From: Brian Masney <masneyb@onstation.org>
To: linus.walleij@linaro.org
Cc: linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com,
tglx@linutronix.de, marc.zyngier@arm.com, ilina@codeaurora.org,
jonathanh@nvidia.com, skomatineni@nvidia.com, bbiswas@nvidia.com,
linux-tegra@vger.kernel.org, david.daney@cavium.com,
yamada.masahiro@socionext.com, treding@nvidia.com,
bjorn.andersson@linaro.org, agross@kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] gpio: use handler in gpio_irq_chip instead of handle_bad_irq
Date: Mon, 8 Jul 2019 07:01:37 -0400 [thread overview]
Message-ID: <20190708110138.24657-4-masneyb@onstation.org> (raw)
In-Reply-To: <20190708110138.24657-1-masneyb@onstation.org>
Use the IRQ handler field that's available in the struct gpio_irq_chip
when allocating an IRQ rather than hardcoding the handler to
handle_bad_irq(). The kernel reboots without any messages when testing
this using spmi-gpio on the Nexus 5.
Signed-off-by: Brian Masney <masneyb@onstation.org>
---
I didn't have time to dig into more detail about why this is happening.
I suspect the issue is that __irq_do_set_handler() has a special check
for handle_bad_irq:
https://elixir.bootlin.com/linux/latest/source/kernel/irq/chip.c#L974
My post about this:
https://lore.kernel.org/linux-gpio/20190707014620.GA9690@onstation.org/
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5423242deb81..bc68ebb8f40e 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1872,7 +1872,7 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
hwirq + i,
gc->irq.chip,
gc,
- handle_bad_irq,
+ girq->handler,
NULL, NULL);
irq_set_probe(irq + i);
--
2.20.1
next prev parent reply other threads:[~2019-07-08 11:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 11:01 [PATCH 0/4] gpio: hierarchical IRQ improvements Brian Masney
2019-07-08 11:01 ` [PATCH 1/4] gpio: introduce gpiochip_populate_parent_fwspec_{two,four}cell functions Brian Masney
2019-07-08 11:01 ` [PATCH 2/4] gpio: allow customizing hierarchical IRQ chips Brian Masney
2019-07-28 22:49 ` Linus Walleij
2019-07-29 0:11 ` Brian Masney
2019-07-08 11:01 ` Brian Masney [this message]
2019-07-08 11:01 ` [PATCH 4/4] qcom: spmi-gpio: convert to hierarchical IRQ helpers in gpio core Brian Masney
2019-08-07 13:41 ` [PATCH 0/4] gpio: hierarchical IRQ improvements Linus Walleij
2019-08-07 13:43 ` Linus Walleij
2019-08-07 14:07 ` Brian Masney
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=20190708110138.24657-4-masneyb@onstation.org \
--to=masneyb@onstation.org \
--cc=agross@kernel.org \
--cc=bbiswas@nvidia.com \
--cc=bgolaszewski@baylibre.com \
--cc=bjorn.andersson@linaro.org \
--cc=david.daney@cavium.com \
--cc=ilina@codeaurora.org \
--cc=jonathanh@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=skomatineni@nvidia.com \
--cc=tglx@linutronix.de \
--cc=treding@nvidia.com \
--cc=yamada.masahiro@socionext.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