Received: from eggs.gnu.org ([2001:4830:134:3::10]:41471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbDEM-0006Y3-9m for qemu-devel@nongnu.org; Tue, 29 Oct 2013 13:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbDEG-0007mr-AQ for qemu-devel@nongnu.org; Tue, 29 Oct 2013 13:37:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbDEG-0007mi-14 for qemu-devel@nongnu.org; Tue, 29 Oct 2013 13:37:20 -0400 From: Markus Armbruster References: <1383062897-30084-1-git-send-email-armbru@redhat.com> <1383062897-30084-8-git-send-email-armbru@redhat.com> <526FE1B7.6010707@redhat.com> Date: Tue, 29 Oct 2013 18:37:12 +0100 In-Reply-To: <526FE1B7.6010707@redhat.com> (Eric Blake's message of "Tue, 29 Oct 2013 10:26:31 -0600") Message-ID: <87a9hsj7w7.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org, borntraeger@de.ibm.com, anthony@codemonkey.ws, afaerber@suse.de Eric Blake writes: > On 10/29/2013 10:08 AM, armbru@redhat.com wrote: >> From: Markus Armbruster >> >> 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? Nope, editing error. Will fix, thanks!