[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device |
Date: |
Mon, 02 Jan 2012 23:41:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
Am 20.12.2011 17:51, schrieb Anthony Liguori:
> I have no idea what's going on here, but this is broken and cannot possibly
> work because:
>
> 1) It's qdev name conflicts with a device that sits on SysBus
>
> 2) The PCI constructor expects a SysBus device... but's it's a PCIDevice
>
> If you do qdev_create("grackle"), the code expects to get the SysBus version
> 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
>
> Signed-off-by: Anthony Liguori <address@hidden>
> ---
> hw/grackle_pci.c | 17 -----------------
> 1 files changed, 0 insertions(+), 17 deletions(-)
>
> 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;
> }
>
> -static int grackle_pci_host_init(PCIDevice *d)
> -{
> - d->config[0x09] = 0x01;
> - return 0;
> -}
> -
> -static PCIDeviceInfo grackle_pci_host_info = {
> - .qdev.name = "grackle",
> - .qdev.size = sizeof(PCIDevice),
> - .init = grackle_pci_host_init,
> - .vendor_id = PCI_VENDOR_ID_MOTOROLA,
> - .device_id = PCI_DEVICE_ID_MOTOROLA_MPC106,
> - .revision = 0x00,
> - .class_id = 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);
> }
>
> device_init(grackle_register_devices)
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device,
Andreas Färber <=