From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XChem-0000pr-SS for qemu-devel@nongnu.org; Thu, 31 Jul 2014 00:08:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XChei-0000r8-Gp for qemu-devel@nongnu.org; Thu, 31 Jul 2014 00:07:56 -0400 Received: from mail-vc0-f181.google.com ([209.85.220.181]:35481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XChei-0000r2-Co for qemu-devel@nongnu.org; Thu, 31 Jul 2014 00:07:52 -0400 Received: by mail-vc0-f181.google.com with SMTP id lf12so3319211vcb.26 for ; Wed, 30 Jul 2014 21:07:52 -0700 (PDT) MIME-Version: 1.0 Sender: peter.crosthwaite@petalogix.com In-Reply-To: References: <1404324093-19225-1-git-send-email-agraf@suse.de> <1404324093-19225-8-git-send-email-agraf@suse.de> Date: Thu, 31 Jul 2014 14:07:52 +1000 Message-ID: From: Peter Crosthwaite Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2 7/9] PPC: e500: Support dynamically spawned sysbus devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Eric Auger , QEMU Developers , Alexander Graf , "qemu-ppc@nongnu.org" , "Stalley, Sean" , Paolo Bonzini , =?UTF-8?Q?Andreas_F=C3=A4rber?= On Thu, Jul 31, 2014 at 12:55 AM, Peter Maydell wrote: > On 2 July 2014 19:01, Alexander Graf wrote: >> For e500 our approach to supporting dynamically spawned sysbus devices is to >> create a simple bus from the guest's point of view within which we map those >> devices dynamically. >> >> + /* Connect sysbus device to virtual platform bus */ >> + for (i = 0; i < sbdev->num_irq; i++) { >> + if (!sbdev->irqp[i]) { >> + /* This IRQ is an incoming IRQ, we can't wire those here */ > > I don't understand this comment -- sysbus IRQs are all outbound > by definition. Lines going in to a device are GPIOs. (Ideally we > should get rid of "sysbus IRQs" completely and just use named > inbound GPIOs for everything.) > I have some patches in this area. Will post shortly cc you and Alex. > Also, sbdev->irqp[] is private to the sysbus implementation, so > you shouldn't be fishing about in it in the platform code. > And this is in the crosshairs of that work: @@ -47,8 +49,6 @@ struct SysBusDevice { /*< public >*/ int num_irq; - qemu_irq irqs[QDEV_MAX_IRQ]; - qemu_irq *irqp[QDEV_MAX_IRQ]; Regards, Peter > thanks > -- PMM >