Skip to contentSkip to conversation

xen: Map physical interrupt before setting up GSI

PATCH In review Bastian Blank 1 participant 1 message Mar 24, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 xen: Map physical interrupt before setting up GSI

---
 arch/x86/xen/pci.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
arch/x86/xen/pci.c +11 -11
index a83c74c..eabb512 100644
@@ -45,6 +45,17 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
 	if (irq < 0)
 		return irq;
 
+	map_irq.domid = DOMID_SELF;
+	map_irq.type = MAP_PIRQ_TYPE_GSI;
+	map_irq.index = gsi;
+	map_irq.pirq = irq;
+
+	rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
+	if (rc) {
+		printk(KERN_WARNING "xen map irq failed %d\n", rc);
+		return -1;
+	}
+
 	setup_gsi.gsi = gsi;
 	setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ?
 			0 : 1);
@@ -59,17 +70,6 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
 		BUG();
 	}
 
-	map_irq.domid = DOMID_SELF;
-	map_irq.type = MAP_PIRQ_TYPE_GSI;
-	map_irq.index = gsi;
-	map_irq.pirq = irq;
-
-	rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
-	if (rc) {
-		printk(KERN_WARNING "xen map irq failed %d\n", rc);
-		return -1;
-	}
-
 	return irq;
 }
 
Signature · 6 lines
1.7.0


-- 
It is undignified for a woman to play servant to a man who is not hers.
		-- Spock, "Amok Time", stardate 3372.7