irqchip: gic: Add an entry point to set up irqchip flags
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 11 Mar 2015 15:45:34 +0000 (15:45 +0000)
committerJason Cooper <jason@lakedaemon.net>
Sun, 15 Mar 2015 01:27:42 +0000 (01:27 +0000)
A common use of gic_arch_extn is to set up additional flags
to the GIC irqchip. It looks like a benign enough hack that
doesn't really require the users of that feature to be converted
to stacked domains.

Add a gic_set_irqchip_flags() function that platform code can
call instead of using the dreaded gic_arch_extn.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1426088737-15817-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
drivers/irqchip/irq-gic.c
include/linux/irqchip/arm-gic.h

index 4634cf7d0ec379d5578319d45194cb18c9997510..072432c22207aaa1b7ea3fb81047c8e32b1b57e6 100644 (file)
@@ -922,6 +922,11 @@ static const struct irq_domain_ops gic_default_routable_irq_domain_ops = {
 const struct irq_domain_ops *gic_routable_irq_domain_ops =
                                        &gic_default_routable_irq_domain_ops;
 
+void gic_set_irqchip_flags(unsigned long flags)
+{
+       gic_chip.flags |= flags;
+}
+
 void __init gic_init_bases(unsigned int gic_nr, int irq_start,
                           void __iomem *dist_base, void __iomem *cpu_base,
                           u32 percpu_offset, struct device_node *node)
index 71d706d5f16922a5b95edfd6e6f93971139e7d81..3bca864fd6fc80e8e8580e2af8fca03f9a359283 100644 (file)
@@ -97,6 +97,7 @@ struct device_node;
 
 extern struct irq_chip gic_arch_extn;
 
+void gic_set_irqchip_flags(unsigned long flags);
 void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
                    u32 offset, struct device_node *);
 void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);