mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pci/intr_remapping: allocate irq_iommu on node
@ 2009-08-04 16:04 Yinghai Lu
  2009-08-04 17:19 ` Suresh Siddha
  2009-08-08 15:22 ` [tip:irq/core] pci/intr_remapping: Allocate " tip-bot for Yinghai Lu
  0 siblings, 2 replies; 12+ messages in thread
From: Yinghai Lu @ 2009-08-04 16:04 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Jesse Barnes,
	Suresh Siddha
  Cc: linux-kernel, linux-pci


make it use node from irq_desc.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/pci/intr_remapping.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/pci/intr_remapping.c
===================================================================
--- linux-2.6.orig/drivers/pci/intr_remapping.c
+++ linux-2.6/drivers/pci/intr_remapping.c
@@ -201,7 +201,7 @@ int alloc_irte(struct intel_iommu *iommu
 	for (i = index; i < index + count; i++)
 		table->base[i].present = 1;
 
-	irq_iommu = irq_2_iommu_alloc(irq);
+	irq_iommu = irq_2_iommu_alloc_node(irq, irq_to_desc(irq)->node);
 	if (!irq_iommu) {
 		spin_unlock_irqrestore(&irq_2_ir_lock, flags);
 		printk(KERN_ERR "can't allocate irq_2_iommu\n");
@@ -255,7 +255,7 @@ int set_irte_irq(int irq, struct intel_i
 
 	spin_lock_irqsave(&irq_2_ir_lock, flags);
 
-	irq_iommu = irq_2_iommu_alloc(irq);
+	irq_iommu = irq_2_iommu_alloc_node(irq, irq_to_desc(irq)->node);
 
 	if (!irq_iommu) {
 		spin_unlock_irqrestore(&irq_2_ir_lock, flags);

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3
@ 2009-08-26 23:21 Yinghai Lu
  2009-08-29 13:58 ` [tip:irq/core] pci/intr_remapping: Allocate irq_iommu on node tip-bot for Yinghai Lu
  0 siblings, 1 reply; 12+ messages in thread
From: Yinghai Lu @ 2009-08-26 23:21 UTC (permalink / raw)
  To: Ingo Molnar, Jesse Barnes, H. Peter Anvin, Thomas Gleixner, linux-kernel
  Cc: Andrew Morton


make it use node from irq_desc.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>

---
 drivers/pci/intr_remapping.c |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

Index: linux-2.6/drivers/pci/intr_remapping.c
===================================================================
--- linux-2.6.orig/drivers/pci/intr_remapping.c
+++ linux-2.6/drivers/pci/intr_remapping.c
@@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(u
 	return desc->irq_2_iommu;
 }
 
-static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node)
+static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
 {
 	struct irq_desc *desc;
 	struct irq_2_iommu *irq_iommu;
 
-	/*
-	 * alloc irq desc if not allocated already.
-	 */
-	desc = irq_to_desc_alloc_node(irq, node);
+	desc = irq_to_desc(irq);
 	if (!desc) {
 		printk(KERN_INFO "can not get irq_desc for %d\n", irq);
 		return NULL;
@@ -72,16 +69,11 @@ static struct irq_2_iommu *irq_2_iommu_a
 	irq_iommu = desc->irq_2_iommu;
 
 	if (!irq_iommu)
-		desc->irq_2_iommu = get_one_free_irq_2_iommu(node);
+		desc->irq_2_iommu = get_one_free_irq_2_iommu(irq_node(irq));
 
 	return desc->irq_2_iommu;
 }
 
-static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
-{
-	return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id));
-}
-
 #else /* !CONFIG_SPARSE_IRQ */
 
 static struct irq_2_iommu irq_2_iommuX[NR_IRQS];

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-08-29 13:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-04 16:04 [PATCH] pci/intr_remapping: allocate irq_iommu on node Yinghai Lu
2009-08-04 17:19 ` Suresh Siddha
2009-08-05  9:14   ` Yinghai Lu
2009-08-06  0:36     ` Suresh Siddha
2009-08-06  1:19       ` Yinghai Lu
2009-08-06 19:16         ` Suresh Siddha
2009-08-08 15:22 ` [tip:irq/core] pci/intr_remapping: Allocate " tip-bot for Yinghai Lu
2009-08-09 10:44   ` Ingo Molnar
2009-08-10 16:29     ` Jesse Barnes
2009-08-11  3:17       ` [PATCH] pci/intr_remapping: allocate irq_iommu on node -v2 Yinghai Lu
2009-08-11  7:34         ` Ingo Molnar
2009-08-26 23:21 [PATCH] pci/intr_remapping: allocate irq_iommu on node -v3 Yinghai Lu
2009-08-29 13:58 ` [tip:irq/core] pci/intr_remapping: Allocate irq_iommu on node tip-bot for Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome