[PATCH 5.10.y-cip 16/28] of/irq: Update the out_irq->np before returning success

Claudiu
2026-03-11T11:04:30Z

From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

Upstream commit c1e459d72448 ("of/irq: Factor out parsing of interrupt-map
parent phandle+args from of_irq_parse_raw()") refactored the parsing of the
interrupt-map parent phandle and updated out_irq->np before returning
success.

This change allows declaring interrupt-map and interrupt-map-mask on the
PCIe device tree nodes representing the host controllers, pointing to
itself, making it possible to reuse the RZ/G3S PCIe upstream device tree
format in v5.10 CIP.

Without this change, interrupt-map and interrupt-map-mask would have to be
described on the PCIe port DT node, which would break the DT ABI.

Since commit c1e459d72448 ("of/irq: Factor out parsing of interrupt-map
parent phandle+args from of_irq_parse_raw()") spans multiple functions,
and to keep this backport minimal, only the relevant lines are updated.
The functional changes are applied only for the Renesas RZ/G3S SoC.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---
drivers/of/irq.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 691e72598f70..50f998222569 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -271,6 +271,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
addrsize = newaddrsize;

if (renesas) {
+ out_irq->np = newpar;
if (ipar == newpar) {
pr_debug("%pOF interrupt-map entry to self\n", ipar);
return 0;
@@ -279,8 +280,10 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)

skiplevel:
/* Iterate again with new parent */
- out_irq->np = newpar;
- pr_debug(" -> new parent: %pOF\n", newpar);
+ if (!renesas) {
+ out_irq->np = newpar;
+ pr_debug(" -> new parent: %pOF\n", newpar);
+ }
of_node_put(ipar);
ipar = newpar;
newpar = NULL;
--
2.43.0