qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ioh3420: Add a map_irq function


From: Alex Williamson
Subject: [Qemu-devel] [PATCH] ioh3420: Add a map_irq function
Date: Thu, 28 Feb 2013 11:49:01 -0700
User-agent: StGit/0.16

Every bridge needs to know how to map IRQs from it's secondary bus to
the primary bus.  We seem to be direct mapped on ioh3420.  This avoids
segfaults when trying to put assigned devices behind root ports.

Signed-off-by: Alex Williamson <address@hidden>
---
 hw/ioh3420.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hw/ioh3420.c b/hw/ioh3420.c
index 95bceb5..6ac4fe7 100644
--- a/hw/ioh3420.c
+++ b/hw/ioh3420.c
@@ -90,6 +90,11 @@ static void ioh3420_reset(DeviceState *qdev)
     pci_bridge_disable_base_limit(d);
 }
 
+static int ioh3420_map_irq(PCIDevice *pci_dev, int irq_num)
+{
+    return irq_num;
+}
+
 static int ioh3420_initfn(PCIDevice *d)
 {
     PCIBridge* br = DO_UPCAST(PCIBridge, dev, d);
@@ -97,6 +102,8 @@ static int ioh3420_initfn(PCIDevice *d)
     PCIESlot *s = DO_UPCAST(PCIESlot, port, p);
     int rc;
 
+    pci_bridge_map_irq(br, NULL, ioh3420_map_irq);
+
     rc = pci_bridge_initfn(d);
     if (rc < 0) {
         return rc;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]