public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Cc: Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Peter Rosin <peda@axentia.se>, Linus Walleij <linusw@kernel.org>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
	linux-gpio@vger.kernel.org, David Jander <david@protonic.nl>,
	biju.das.jz@bp.renesas.com, tomm.merciai@gmail.com
Subject: Re: [PATCH v3 4/7] gpio: gpiolib: fix allocation order in hierarchical IRQ domains
Date: Fri, 13 Mar 2026 14:08:16 +0100	[thread overview]
Message-ID: <abQMQAbbvV60bV2j@pengutronix.de> (raw)
In-Reply-To: <abPqGvy5FqJ0a0ug@tom-desktop>

Hi Tommaso,

On Fri, Mar 13, 2026 at 11:42:34AM +0100, Tommaso Merciai wrote:
> Hi Oleksij,
> Thanks for your patch.
> 
> I'm working on DSI support for RZ/G3E
> 
> from this morning rebasing on top of next-20260312 I'm seeing
> the following:
> I found out the the issue is related to the interrupt of the adv7535
> bridge:
> 
>         adv7535: hdmi1@3d {
>                 compatible = "adi,adv7535";
>                 ...
>                 ...
>                 interrupts-extended = <&pinctrl RZG3E_GPIO(L, 4) IRQ_TYPE_EDGE_FALLING>;
> 
> RZ/G3E is using:
>  - drivers/pinctrl/renesas/pinctrl-rzg2l.c
> 
> Reverting this patch fix the issue.
> (git revert a23463beb3d5)

Thank you for the feedback! If I understand the problem correctly, the
adv7535 is asserting its IRQ line early during probe, which creates an
irq storm due to a missing handler.

My patch moved irq_domain_set_info() after the parent allocation. When
the parent allocates the IRQ, the pending hardware interrupt fires
immediately. Because the child descriptor isn't fully configured yet, it
routes to handle_bad_irq. This fails to acknowledge the hardware
interrupt, locking up the CPU and causing the RCU stall.

I hope splitting the irq_domain_set_info() should fix the regression.
Can you please test if this change resolve the RCU stalls on your setup:

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 13dd97344b26..376daeddbbbb 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1628,6 +1628,9 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
 	}
 	gpiochip_dbg(gc, "found parent hwirq %u\n", parent_hwirq);
 
+	irq_set_handler(irq, girq->handler);
+	irq_set_handler_data(irq, gc);
+
 	/* This parent only handles asserted level IRQs */
 	ret = girq->populate_parent_alloc_arg(gc, &gpio_parent_fwspec,
 					      parent_hwirq, parent_type);
@@ -1655,13 +1658,7 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
 	 * We set handle_bad_irq because the .set_type() should
 	 * always be invoked and set the right type of handler.
 	 */
-	irq_domain_set_info(d,
-			    irq,
-			    hwirq,
-			    gc->irq.chip,
-			    gc,
-			    girq->handler,
-			    NULL, NULL);
+	irq_domain_set_hwirq_and_chip(d, irq, hwirq, gc->irq.chip, gc);
 	irq_set_probe(irq);
 
 	return 0;
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2026-03-13 13:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 13:49 [PATCH v3 0/8] mfd: Add support for NXP MC33978/MC34978 MSDI Oleksij Rempel
2026-03-09 13:49 ` [PATCH v3 1/7] dt-bindings: mfd: add " Oleksij Rempel
2026-03-11  6:51   ` Krzysztof Kozlowski
2026-03-09 13:49 ` [PATCH v3 2/7] mfd: add NXP MC33978/MC34978 core driver Oleksij Rempel
2026-03-09 13:49 ` [PATCH v3 3/7] pinctrl: core: Make pin group callbacks optional Oleksij Rempel
2026-03-10  9:03   ` Linus Walleij
2026-03-09 13:49 ` [PATCH v3 4/7] gpio: gpiolib: fix allocation order in hierarchical IRQ domains Oleksij Rempel
2026-03-10  9:05   ` Linus Walleij
2026-03-10  9:14     ` Bartosz Golaszewski
2026-03-11  9:18       ` Bartosz Golaszewski
2026-03-11 13:40         ` Oleksij Rempel
2026-03-11 14:20           ` Bartosz Golaszewski
2026-03-13 10:42   ` Tommaso Merciai
2026-03-13 13:08     ` Oleksij Rempel [this message]
2026-03-13 13:52       ` Tommaso Merciai
2026-03-13 14:35         ` Bartosz Golaszewski
2026-03-14  7:08           ` Oleksij Rempel
2026-03-16  8:29             ` Bartosz Golaszewski
2026-03-09 13:49 ` [PATCH v3 5/7] pinctrl: add NXP MC33978/MC34978 pinctrl driver Oleksij Rempel
2026-03-10  9:09   ` Linus Walleij
2026-03-09 13:49 ` [PATCH v3 6/7] hwmon: add NXP MC33978/MC34978 driver Oleksij Rempel
2026-03-09 13:49 ` [PATCH v3 7/7] mux: add NXP MC33978/MC34978 AMUX driver Oleksij Rempel
2026-03-11 14:21 ` (subset) [PATCH v3 0/8] mfd: Add support for NXP MC33978/MC34978 MSDI 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=abQMQAbbvV60bV2j@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=david@protonic.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=peda@axentia.se \
    --cc=robh@kernel.org \
    --cc=tomm.merciai@gmail.com \
    --cc=tommaso.merciai.xr@bp.renesas.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