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


Groups > linux.kernel > #1264624 > unrolled thread

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

Started byKeith Busch <keith.busch@intel.com>
First post2015-11-06 23:50 +0100
Last post2015-11-07 12:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCHv4 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains Keith Busch <keith.busch@intel.com> - 2015-11-06 23:50 +0100
    Re: [PATCHv4 1/6] msi: Relax msi_domain_alloc() to support parentless  MSI irqdomains Thomas Gleixner <tglx@linutronix.de> - 2015-11-07 12:50 +0100

#1264624 — [PATCHv4 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains

FromKeith Busch <keith.busch@intel.com>
Date2015-11-06 23:50 +0100
Subject[PATCHv4 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains
Message-ID<qrXZv-2gc-5@gated-at.bofh.it>
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>
Signed-off-by: Liu Jiang <jiang.liu@linux.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 be9149f..01644d4 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/

[toc] | [next] | [standalone]


#1264819 — Re: [PATCHv4 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains

FromThomas Gleixner <tglx@linutronix.de>
Date2015-11-07 12:50 +0100
SubjectRe: [PATCHv4 1/6] msi: Relax msi_domain_alloc() to support parentless MSI irqdomains
Message-ID<qsaam-1K0-3@gated-at.bofh.it>
In reply to#1264624
On Fri, 6 Nov 2015, Keith Busch wrote:
> From: Liu Jiang <jiang.liu@linux.intel.com>
... 
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> Signed-off-by: Liu Jiang <jiang.liu@linux.intel.com>

Hehehe. Let me read that from/sob chain:

Liu wrote the patch and then handed it over to Jiang who sent it back
to Liu and Liu sent it to Keith.

Now what's missing is the SOB from Keith to make that chain perfect

Other than that, this is the right solution.

Thanks,

	tglx
--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web