From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIM8h-0004rp-Ka for qemu-devel@nongnu.org; Fri, 06 May 2011 10:36:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIM8g-0005AM-Fi for qemu-devel@nongnu.org; Fri, 06 May 2011 10:36:19 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:50219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIM8g-00059g-7f for qemu-devel@nongnu.org; Fri, 06 May 2011 10:36:18 -0400 From: Paul Brook Date: Fri, 6 May 2011 15:36:13 +0100 References: <1304683237-26177-1-git-send-email-agraf@suse.de> <1304683237-26177-8-git-send-email-agraf@suse.de> In-Reply-To: <1304683237-26177-8-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201105061536.13783.paul@codesourcery.com> Subject: Re: [Qemu-devel] [PATCH 7/7] PPC: Qdev'ify e500 pci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Scott Wood , "Edgar E. Iglesias" , Liu Yu , Alexander Graf > PCIBus *ppce500_pci_init(qemu_irq pci_irqs[4], target_phys_addr_t > registers) { > - PPCE500PCIState *controller; > + DeviceState *dev; > + PCIBus *b; > + PCIHostState *h; > + PPCE500PCIState *s; > PCIDevice *d; > - int index; > static int ppce500_pci_id; > + SysBusDevice *sb; > + > + dev = qdev_create(NULL, "e500-pcihost"); > + sb = sysbus_from_qdev(dev); > + h = FROM_SYSBUS(PCIHostState, sb); > + s = DO_UPCAST(PPCE500PCIState, pci_state, h); > + > + b = pci_register_bus(&s->pci_state.busdev.qdev, NULL, No. This function should not exist. All this should be done in e500_pcihost_initfn. Please do the qdev conversion properly. See versatilepb.c/versatile_pci.c for an example of how this is supposed to be done. > + .qdev.no_user = 1, There's no good reason for this. It indicates you did the qdev conversion incorrectly. Paul