On 10/29/2013 10:08 AM, arm...@redhat.com wrote:
> From: Markus Armbruster <arm...@redhat.com>
> 
> A PIIX3/PIIX4 southbridge has multiple functions.  We model each
> function as a separate qdev.  Two of them need some special wiring set
> up in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0,
> and the SMBus controller at 01.3.
> 
> The IDE controller at 01.1 (piix3-ide, piix3-ide-xen, piix4-ide) has
> always had cannot_instantiate_with_device_add_yet set, but there is no
> obvious reason why device_add could not work for them.  Drop it.

> +++ b/hw/acpi/piix4.c
> @@ -508,9 +508,14 @@ static void piix4_pm_class_init(ObjectClass *klass, void 
> *data)
>      k->revision = 0x03;
>      k->class_id = PCI_CLASS_BRIDGE_OTHER;
>      dc->desc = "PM";
> -    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why 
> */
> +    dc->cannot_instantiate_with_device_add_yet = true;
>      dc->vmsd = &vmstate_acpi;
>      dc->props = piix4_pm_properties;
> +    /*
> +     * Reason: part of PIIX4 southbridge, needs to be wired up,
> +     * e.g. by mips_malta_init()
> +     */
> +    dc->cannot_instantiate_with_device_add_yet = true;

Is it intentional that you initialize the field twice to the same value?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to