x86, mpparse, irq: Provide basic irqdomain support
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 9 Jun 2014 08:19:55 +0000 (16:19 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 21 Jun 2014 21:05:43 +0000 (23:05 +0200)
Enhance mpparse to provide basic support of irqdomain.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1402302011-23642-27-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/mpparse.c

index ea8595e4cbd587d523391e952a7ec66d73525eb8..13c8e1f864fcd0d79e631675a70af2ccd85efe2d 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/pci.h>
+#include <linux/irqdomain.h>
 
 #include <asm/mtrr.h>
 #include <asm/mpspec.h>
@@ -112,10 +113,17 @@ static void __init MP_bus_info(struct mpc_bus *m)
                pr_warn("Unknown bustype %s - ignoring\n", str);
 }
 
+static struct irq_domain_ops mp_ioapic_irqdomain_ops;
+
 static void __init MP_ioapic_info(struct mpc_ioapic *m)
 {
+       struct ioapic_domain_cfg cfg = {
+               .type = IOAPIC_DOMAIN_LEGACY,
+               .ops = &mp_ioapic_irqdomain_ops,
+       };
+
        if (m->flags & MPC_APIC_USABLE)
-               mp_register_ioapic(m->apicid, m->apicaddr, gsi_top, NULL);
+               mp_register_ioapic(m->apicid, m->apicaddr, gsi_top, &cfg);
 }
 
 static void __init print_mp_irq_info(struct mpc_intsrc *mp_irq)