qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 07/10] piix3 piix4: Clean up use of cannot_in


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet
Date: Tue, 29 Oct 2013 10:26:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/29/2013 10:08 AM, address@hidden wrote:
> From: Markus Armbruster <address@hidden>
> 
> 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

[Prev in Thread] Current Thread [Next in Thread]