[v4,05/19] irqchip: add nps Internal and external irqchips
diff mbox

Message ID HE1PR02MB1387F61AE58E7011D744E564D6DB0@HE1PR02MB1387.eurprd02.prod.outlook.com
State Superseded
Headers show

Commit Message

Noam Camus Jan. 29, 2016, 4:37 p.m. UTC
Hi Marc,

Please respond to Vineet last email.
I wish to close the IPI handling within my patch set.

Regards,
Noam

Patch
diff mbox

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 6312f607932f..576f1c40ba75 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -31,6 +31,7 @@  config ARC
        select HAVE_MOD_ARCH_SPECIFIC if ARC_DW2_UNWIND
        select HAVE_OPROFILE
        select HAVE_PERF_EVENTS
+       select HANDLE_DOMAIN_IRQ
        select IRQ_DOMAIN
        select MODULES_USE_ELF_RELA
        select NO_BOOTMEM
diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c
index 0394f9f61b46..cede73b50d31 100644
--- a/arch/arc/kernel/intc-arcv2.c
+++ b/arch/arc/kernel/intc-arcv2.c
@@ -130,21 +130,24 @@  static const struct irq_domain_ops arcv2_irq_ops = {
        .map = arcv2_irq_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,
                                            &arcv2_irq_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;
diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c
index 06bcedf19b62..c2df66624bbb 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;
diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c
index ba17f85285cf..5c027005039b 100644
--- a/arch/arc/kernel/irq.c
+++ b/arch/arc/kernel/irq.c
@@ -41,14 +41,9 @@  void __init init_IRQ(void)
  * "C" Entry point for any ARC ISR, called from low level vector handler
  * @irq is the vector number read from ICAUSE reg of on-chip intc
  */
-void arch_do_IRQ(unsigned int irq, struct pt_regs *regs)
+void arch_do_IRQ(unsigned int hwirq, struct pt_regs *regs)
 {
-       struct pt_regs *old_regs = set_irq_regs(regs);
-
-       irq_enter();
-       generic_handle_irq(irq);
-       irq_exit();
-       set_irq_regs(old_regs);
+       handle_domain_irq(NULL, hwirq, regs);
 }

 /*