qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: mst@redhat.com
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] xio3130: Add map_irq functions
Date: Thu, 07 Mar 2013 11:29:46 -0700	[thread overview]
Message-ID: <20130307182932.22161.62817.stgit@bling.home> (raw)

Just like root ports, I think these are supposed to be direct mapped.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 hw/xio3130_downstream.c |    7 +++++++
 hw/xio3130_upstream.c   |    7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c
index 7f00bc8..c484770 100644
--- a/hw/xio3130_downstream.c
+++ b/hw/xio3130_downstream.c
@@ -54,6 +54,11 @@ static void xio3130_downstream_reset(DeviceState *qdev)
     pci_bridge_reset(qdev);
 }
 
+static int xio3130_downstream_map_irq(PCIDevice *pci_dev, int irq_num)
+{
+    return irq_num;
+}
+
 static int xio3130_downstream_initfn(PCIDevice *d)
 {
     PCIBridge* br = DO_UPCAST(PCIBridge, dev, d);
@@ -61,6 +66,8 @@ static int xio3130_downstream_initfn(PCIDevice *d)
     PCIESlot *s = DO_UPCAST(PCIESlot, port, p);
     int rc;
 
+    pci_bridge_map_irq(br, NULL, xio3130_downstream_map_irq);
+
     rc = pci_bridge_initfn(d);
     if (rc < 0) {
         return rc;
diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c
index 70b15d3..c233a43 100644
--- a/hw/xio3130_upstream.c
+++ b/hw/xio3130_upstream.c
@@ -51,12 +51,19 @@ static void xio3130_upstream_reset(DeviceState *qdev)
     pcie_cap_deverr_reset(d);
 }
 
+static int xio3130_upstream_map_irq(PCIDevice *pci_dev, int irq_num)
+{
+    return irq_num;
+}
+
 static int xio3130_upstream_initfn(PCIDevice *d)
 {
     PCIBridge* br = DO_UPCAST(PCIBridge, dev, d);
     PCIEPort *p = DO_UPCAST(PCIEPort, br, br);
     int rc;
 
+    pci_bridge_map_irq(br, NULL, xio3130_upstream_map_irq);
+
     rc = pci_bridge_initfn(d);
     if (rc < 0) {
         return rc;

             reply	other threads:[~2013-03-07 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 18:29 Alex Williamson [this message]
2013-03-07 18:49 ` [Qemu-devel] [PATCH] xio3130: Add map_irq functions Michael S. Tsirkin
2013-03-07 19:17   ` Alex Williamson
2013-03-07 19:22     ` Michael S. Tsirkin
2013-03-07 19:31       ` Alex Williamson
2013-03-07 20:31         ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130307182932.22161.62817.stgit@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).