From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: agraf@suse.de, david@gibson.dropbear.id.au
Subject: [Qemu-devel] [PATCH v2 3/3] spapr: make irq customizable via qdev
Date: Thu, 26 May 2011 11:52:46 +0200 [thread overview]
Message-ID: <1306403566-31597-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1306403566-31597-1-git-send-email-pbonzini@redhat.com>
This also lets the user see the irq in "info qtree".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: David Gibson <david@gibson.dropbear.id.au>
---
hw/spapr_vio.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c
index 8b31bc6..877c4d6 100644
--- a/hw/spapr_vio.c
+++ b/hw/spapr_vio.c
@@ -52,6 +52,10 @@
static struct BusInfo spapr_vio_bus_info = {
.name = "spapr-vio",
.size = sizeof(VIOsPAPRBus),
+ .props = (Property[]) {
+ DEFINE_PROP_UINT32("irq", VIOsPAPRDevice, vio_irq_num, 0), \
+ DEFINE_PROP_END_OF_LIST(),
+ },
};
VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg)
@@ -604,7 +608,9 @@ static int spapr_vio_busdev_init(DeviceState *qdev, DeviceInfo *qinfo)
}
dev->qdev.id = id;
- dev->vio_irq_num = bus->irq++;
+ if (!dev->vio_irq_num) {
+ dev->vio_irq_num = bus->irq++;
+ }
dev->qirq = spapr_find_qirq(spapr, dev->vio_irq_num);
rtce_init(dev);
--
1.7.4.4
prev parent reply other threads:[~2011-05-26 9:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 9:52 [Qemu-devel] [PATCH v2 0/3] spapr qdevification Paolo Bonzini
2011-05-26 9:52 ` [Qemu-devel] [PATCH v2 1/3] spapr: proper qdevification Paolo Bonzini
2011-07-07 14:10 ` Alexander Graf
2011-05-26 9:52 ` [Qemu-devel] [PATCH v2 2/3] spapr: prepare for qdevification of irq Paolo Bonzini
2011-05-26 9:52 ` Paolo Bonzini [this message]
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=1306403566-31597-4-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--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).