[PATCH 6.6 1412/1424] irqdomain: Make build work for CONFIG_GENERIC_IRQ_CHIP=n

From
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date
2026-09-12 15:22:30
Also in
linux-patches
Reply to
Greg Kroah-Hartman, 2026-09-12
6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <redacted>

[ Upstream commit 8cb2dbf94e44bcde4cff0223f2f900f8fb9083a4 ]

ld: kernel/irq/irqdomain.o: in function `irq_domain_instantiate':
kernel/irq/irqdomain.c:296:(.text+0x10dd): undefined reference to `irq_domain_alloc_generic_chips'
ld: kernel/irq/irqdomain.c:313:(.text+0x1218): undefined reference to `irq_domain_remove_generic_chips'
ld: kernel/irq/irqdomain.o: in function `irq_domain_remove':
kernel/irq/irqdomain.c:349:(.text+0x1ddf): undefined reference to `irq_domain_remove_generic_chips'

Provide the required stubs.

Fixes: e6f67ce32e8e ("irqdomain: Add support for generic irq chips creation before publishing a domain")
Reported-by: Borislav Betkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/irq.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 7bbd613c9e5a9..77fb0c510119a 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -1174,9 +1174,19 @@ int devm_irq_setup_generic_chip(struct device *dev, struct irq_chip_generic *gc,
 
 struct irq_chip_generic *irq_get_domain_generic_chip(struct irq_domain *d, unsigned int hw_irq);
 
+#ifdef CONFIG_GENERIC_IRQ_CHIP
 int irq_domain_alloc_generic_chips(struct irq_domain *d,
 				   const struct irq_domain_chip_generic_info *info);
 void irq_domain_remove_generic_chips(struct irq_domain *d);
+#else
+static inline int
+irq_domain_alloc_generic_chips(struct irq_domain *d,
+			       const struct irq_domain_chip_generic_info *info)
+{
+	return -EINVAL;
+}
+static inline void irq_domain_remove_generic_chips(struct irq_domain *d) { }
+#endif /* CONFIG_GENERIC_IRQ_CHIP */
 
 int __irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip,
 				     int num_ct, const char *name,
-- 
2.53.0


Thread (1,439 messages) 1,439 messages, 12 authors, last reply 12d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help