summaryrefslogtreecommitdiff
path: root/arch/arc/kernel/intc-compact.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-01-01 15:12:54 +0530
committerVineet Gupta <vgupta@synopsys.com>2016-05-09 09:32:30 +0530
commit1b0ccb8a4eee2d8c14adc996e07335cb7aa9e2ac (patch)
treeb78ae35cc351dd3faffcaf8a6fd200b1dd2a0ec3 /arch/arc/kernel/intc-compact.c
parent88555cc584d93e658722f090d3f8fb84d5fa15a5 (diff)
ARC: [intc-*] Do a domain lookup in primary handler for hwirq -> linux virq
The primary interrupt handler arch_do_IRQ() was passing hwirq as linux virq to core code. This was fragile and worked so far as we only had legacy/linear domains. This came out of a rant by Marc Zyngier. http://lists.infradead.org/pipermail/linux-snps-arc/2015-December/000298.html Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Noam Camus <noamc@ezchip.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/intc-compact.c')
-rw-r--r--arch/arc/kernel/intc-compact.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c
index d31bc647146d..48a8b24de23e 100644
--- a/arch/arc/kernel/intc-compact.c
+++ b/arch/arc/kernel/intc-compact.c
@@ -97,21 +97,23 @@ static const struct irq_domain_ops arc_intc_domain_ops = {
.map = arc_intc_domain_map,
};
-static struct irq_domain *root_domain;
-
static int __init
init_onchip_IRQ(struct device_node *intc, struct device_node *parent)
{
+ struct irq_domain *root_domain;
+
if (parent)
panic("DeviceTree incore intc not a root irq controller\n");
root_domain = irq_domain_add_legacy(intc, NR_CPU_IRQS, 0, 0,
&arc_intc_domain_ops, NULL);
-
if (!root_domain)
panic("root irq domain not avail\n");
- /* with this we don't need to export root_domain */
+ /*
+ * Needed for primary domain lookup to succeed
+ * This is a primary irqchip, and can never have a parent
+ */
irq_set_default_host(root_domain);
return 0;