From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R42s1-0005O8-PK for qemu-devel@nongnu.org; Wed, 14 Sep 2011 23:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R42rw-00059R-T6 for qemu-devel@nongnu.org; Wed, 14 Sep 2011 23:44:13 -0400 Date: Thu, 15 Sep 2011 13:15:29 +1000 From: David Gibson Message-ID: <20110915031529.GS9025@yookeroo.fritz.box> References: <1315989802-18753-1-git-send-email-agraf@suse.de> <1315989802-18753-4-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1315989802-18753-4-git-send-email-agraf@suse.de> Subject: Re: [Qemu-devel] [PATCH 03/58] spapr: make irq customizable via qdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Blue Swirl , Paolo Bonzini , qemu-ppc@nongnu.org, qemu-devel Developers , Aurelien Jarno On Wed, Sep 14, 2011 at 10:42:27AM +0200, Alexander Graf wrote: > From: Paolo Bonzini > > This also lets the user see the irq in "info qtree". Um.. I'm a bit confused by this one. The previous patch comment implies it's a preparation for this, but then you add the new irq property to the BusInfo, rather than to the macro that goes into the DeviceInfos. Why does this one go in the bus, rather than the device? > > Signed-off-by: Paolo Bonzini > Cc: Alexander Graf > Cc: David Gibson > Signed-off-by: Alexander Graf > --- > 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 ba2e1c1..0546ccb 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); -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson