aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2024-06-17 20:31:31 +0200
committerThomas Gleixner <[email protected]>2024-06-17 20:46:39 +0200
commit8cb2dbf94e44bcde4cff0223f2f900f8fb9083a4 (patch)
treeb89890babb082d0d1b7c40988600896df12a9cc8
parent92584deade41ac8dda3f9b79ab545f50ba0e95db (diff)
irqdomain: Make build work for CONFIG_GENERIC_IRQ_CHIP=n
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r--include/linux/irq.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 712bcee56efc..1f5dbf1f92c9 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -1182,9 +1182,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,