[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/7] PPC: Qdev'ify e500 pci
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH 7/7] PPC: Qdev'ify e500 pci |
Date: |
Fri, 6 May 2011 15:36:13 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.38-2-amd64; KDE/4.4.5; x86_64; ; ) |
> 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
- [Qemu-devel] [PATCH 0/7] PPC: Add FSL (e500) MMU emulation v4, Alexander Graf, 2011/05/06
- [Qemu-devel] [PATCH 3/7] PPC: Add GS MSR definition, Alexander Graf, 2011/05/06
- [Qemu-devel] [PATCH 1/7] PPC: Make MPC8544DS obey -cpu switch, Alexander Graf, 2011/05/06
- [Qemu-devel] [PATCH 6/7] PPC MPC7544DS: Use new TLB helper function, Alexander Graf, 2011/05/06
- [Qemu-devel] [PATCH 2/7] PPC: Make MPC8544DS emulation work w/o KVM, Alexander Graf, 2011/05/06
- [Qemu-devel] [PATCH 7/7] PPC: Qdev'ify e500 pci, Alexander Graf, 2011/05/06
- Re: [Qemu-devel] [PATCH 7/7] PPC: Qdev'ify e500 pci,
Paul Brook <=
- [Qemu-devel] [PATCH 4/7] PPC: Add another 64 bits to instruction feature mask, Alexander Graf, 2011/05/06
- [Qemu-devel] [PATCH 5/7] PPC: Implement e500 (FSL) MMU, Alexander Graf, 2011/05/06