summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorLiu Jiang <jiang.liu@linux.intel.com>2016-01-12 23:18:06 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-01-14 22:59:09 +0300
commitbf6f869f8c111ba265cd199c64b25c646987500a (patch)
treedf784b909775f2396870d5a2fb3f86431c85a98b /kernel/irq
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
downloadlinux-bf6f869f8c111ba265cd199c64b25c646987500a.tar.xz
genirq/MSI: Relax msi_domain_alloc() to support parentless MSI irqdomains
Previously msi_domain_alloc() assumed MSI irqdomains always had parent irqdomains, but that's not true for the new Intel VMD devices. Relax msi_domain_alloc() to support parentless MSI irqdomains. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/msi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 6b0c0b74a2a1..5e15cb4b2f00 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -109,9 +109,11 @@ static int msi_domain_alloc(struct irq_domain *domain, unsigned int virq,
if (irq_find_mapping(domain, hwirq) > 0)
return -EEXIST;
- ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg);
- if (ret < 0)
- return ret;
+ if (domain->parent) {
+ ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg);
+ if (ret < 0)
+ return ret;
+ }
for (i = 0; i < nr_irqs; i++) {
ret = ops->msi_init(domain, info, virq + i, hwirq + i, arg);