From 2f6864a48779d74750f5d599e55c9dc18dfbb4e0 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 12 Jul 2023 15:35:05 +0200 Subject: [PATCH] lx_emul: make ARM irqchip handler extendable * Allow support for kernel configurations without CONFIG_IRQ_DOMAIN_HIERARCHY * Export `irq_domain` instantiated for driver-specific extensions of the irqchip Fix genodelabs/genode#4964 --- repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c index bee4f5d034..083e9f0648 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c @@ -63,6 +63,7 @@ struct irq_chip dde_irqchip_data_chip = { }; +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY static int dde_domain_translate(struct irq_domain * d, struct irq_fwspec * fwspec, unsigned long * hwirq, @@ -111,16 +112,19 @@ static int dde_domain_alloc(struct irq_domain * domain, return 0; } +#endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */ static const struct irq_domain_ops dde_irqchip_data_domain_ops = { +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY .translate = dde_domain_translate, .alloc = dde_domain_alloc, .free = irq_domain_free_irqs_common, +#endif }; -static struct irq_domain *dde_irq_domain; +struct irq_domain *dde_irq_domain; int lx_emul_irq_init(struct device_node *node, struct device_node *parent) {