From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rhqan-0000ht-Nx for qemu-devel@nongnu.org; Mon, 02 Jan 2012 17:42:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rhqam-0001r7-Gl for qemu-devel@nongnu.org; Mon, 02 Jan 2012 17:42:57 -0500 Received: from cantor2.suse.de ([195.135.220.15]:39802 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rhqam-0001r1-7Z for qemu-devel@nongnu.org; Mon, 02 Jan 2012 17:42:56 -0500 Message-ID: <4F023295.3030409@suse.de> Date: Mon, 02 Jan 2012 23:41:25 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1324399916-21315-1-git-send-email-aliguori@us.ibm.com> <1324399916-21315-25-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1324399916-21315-25-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , Alexander Graf , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Markus Armbruster Am 20.12.2011 17:51, schrieb Anthony Liguori: > I have no idea what's going on here, but this is broken and cannot poss= ibly > work because: >=20 > 1) It's qdev name conflicts with a device that sits on SysBus >=20 > 2) The PCI constructor expects a SysBus device... but's it's a PCIDevi= ce >=20 > If you do qdev_create("grackle"), the code expects to get the SysBus ve= rsion > so drop the mystery PCI version. Nack. That's most definitely wrong! The qdev_create("grackle") SysBus device instantiates the PCI host via pci_create_simple(..., "grackle"), which does work, whether intentionally or by accent. (cc'ing mst) For PReP we have the same situation in the patch I'm rebasing, two named "prep-pci". I'll just change the name then. Guess that's what we should do for grackle and uni-north as well. (cc'ing Alex) Anthony, please cc us next time you have doubts about ppc emulation! Andreas >=20 > Signed-off-by: Anthony Liguori > --- > hw/grackle_pci.c | 17 ----------------- > 1 files changed, 0 insertions(+), 17 deletions(-) >=20 > diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c > index 1e529fb..84f1a47 100644 > --- a/hw/grackle_pci.c > +++ b/hw/grackle_pci.c > @@ -115,27 +115,10 @@ static int pci_grackle_init_device(SysBusDevice *= dev) > return 0; > } > =20 > -static int grackle_pci_host_init(PCIDevice *d) > -{ > - d->config[0x09] =3D 0x01; > - return 0; > -} > - > -static PCIDeviceInfo grackle_pci_host_info =3D { > - .qdev.name =3D "grackle", > - .qdev.size =3D sizeof(PCIDevice), > - .init =3D grackle_pci_host_init, > - .vendor_id =3D PCI_VENDOR_ID_MOTOROLA, > - .device_id =3D PCI_DEVICE_ID_MOTOROLA_MPC106, > - .revision =3D 0x00, > - .class_id =3D PCI_CLASS_BRIDGE_HOST, > -}; > - > static void grackle_register_devices(void) > { > sysbus_register_dev("grackle", sizeof(GrackleState), > pci_grackle_init_device); > - pci_qdev_register(&grackle_pci_host_info); > } > =20 > device_init(grackle_register_devices) --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg