[tip: irq/drivers] irqchip/gic-v5: Fix standalone IRSes OF probe
From: tip-bot2 for Lorenzo Pieralisi
Date: Thu Oct 15 2026 - 06:25:36 EST
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 64212d63193cfd81849f5948365c7b0ecd011745
Gitweb: https://git.kernel.org/tip/64212d63193cfd81849f5948365c7b0ecd011745
Author: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
AuthorDate: Thu, 15 Oct 2026 10:20:26 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Thu, 15 Oct 2026 12:16:59 +02:00
irqchip/gic-v5: Fix standalone IRSes OF probe
An IRS is architecturally allowed to be standalone, namely, with no
direct CPUs connections. Make sure such configuration is allowed on
OF firmware by skipping "cpus" and "arm,iaffids" IRS node properties
parsing if they are not present so that the IRS configuration can
complete successfully.
Fixes: 5cb1b6dab2de ("irqchip/gic-v5: Add GICv5 IRS/SPI support")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Reviewed-by: Sascha Bischoff <sascha.bischoff@xxxxxxx>
Link: https://patch.msgid.link/20261015-gicv5-irs-no-cpus-v1-2-d4b337b7f000@xxxxxxxxxx
---
drivers/irqchip/irq-gic-v5-irs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/irqchip/irq-gic-v5-irs.c b/drivers/irqchip/irq-gic-v5-irs.c
index b3feb63..53639e6 100644
--- a/drivers/irqchip/irq-gic-v5-irs.c
+++ b/drivers/irqchip/irq-gic-v5-irs.c
@@ -609,6 +609,10 @@ static int __init gicv5_irs_of_init_affinity(struct device_node *node,
u16 iaffid_mask = GENMASK(iaffid_bits - 1, 0);
int ret, i, ncpus, niaffids;
+ /* An IRS is architecturally allowed to have no cpus associated with it */
+ if (!of_property_present(node, "cpus") && !of_property_present(node, "arm,iaffids"))
+ return 0;
+
ncpus = of_count_phandle_with_args(node, "cpus", NULL);
if (ncpus < 0)
return -EINVAL;