Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269109

[PATCHv5 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains

From Keith Busch <keith.busch@intel.com>
Newsgroups linux.kernel
Subject [PATCHv5 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains
Date 2015-11-13 18:20 +0100
Message-ID <quqb2-Rg-35@gated-at.bofh.it> (permalink)
References <quqb0-Rg-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Liu Jiang <jiang.liu@linux.intel.com>

Previously msi_domain_alloc() assumes MSI irqdomains always have parent
irqdomains, but that's not true for the new Intel VMD devices. So relax
msi_domain_alloc() to support parentless MSI irqdomains.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Tested-by: Keith Busch <keith.busch@intel.com>
---
 kernel/irq/msi.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 6b0c0b7..5e15cb4 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);
-- 
2.6.2.307.g37023ba

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv5 0/6] Driver for new VMD device Keith Busch <keith.busch@intel.com> - 2015-11-13 18:20 +0100
  [PATCHv5 2/6] pci: skip child bus with conflicting resources Keith Busch <keith.busch@intel.com> - 2015-11-13 18:20 +0100
  [PATCHv5 6/6] pciutils: Allow 32-bit domains Keith Busch <keith.busch@intel.com> - 2015-11-13 18:20 +0100
  [PATCHv5 5/6] x86/pci: Initial commit for new VMD device driver Keith Busch <keith.busch@intel.com> - 2015-11-13 18:20 +0100
    Re: [PATCHv5 5/6] x86/pci: Initial commit for new VMD device  driver Thomas Gleixner <tglx@linutronix.de> - 2015-11-13 22:30 +0100
      Re: [PATCHv5 5/6] x86/pci: Initial commit for new VMD device driver Keith Busch <keith.busch@intel.com> - 2015-11-13 22:50 +0100
  [PATCHv5 4/6] x86-pci: allow pci domain specific dma ops Keith Busch <keith.busch@intel.com> - 2015-11-13 18:20 +0100
  [PATCHv5 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains Keith Busch <keith.busch@intel.com> - 2015-11-13 18:20 +0100
    Re: [PATCHv5 1/6] msi: Relax msi_domain_alloc() to support parentless  MSI irqdomains Thomas Gleixner <tglx@linutronix.de> - 2015-11-13 22:30 +0100
  Re: [PATCHv5 0/6] Driver for new VMD device Thomas Gleixner <tglx@linutronix.de> - 2015-11-13 22:30 +0100

csiph-web