From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6EFz-0006bZ-RE for qemu-devel@nongnu.org; Fri, 27 May 2016 05:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6EFx-0000Rf-Ui for qemu-devel@nongnu.org; Fri, 27 May 2016 05:40:38 -0400 References: <1464173896-4088-1-git-send-email-zxq_yx_007@163.com> <1464173896-4088-2-git-send-email-zxq_yx_007@163.com> <963b4bae-1f00-7406-6de7-f0bd3be8d2bb@redhat.com> <5747AD41.9050007@163.com> From: Paolo Bonzini Message-ID: <3565905e-3796-e459-f69b-d3daac2728dd@redhat.com> Date: Fri, 27 May 2016 11:40:21 +0200 MIME-Version: 1.0 In-Reply-To: <5747AD41.9050007@163.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xiaoqiang zhao , Peter Maydell Cc: Rob Herring , Peter Crosthwaite , Markus Armbruster , QEMU Developers , Alistair Francis , qemu-arm , =?UTF-8?B?0JDQvdGC0L7QvSDQn9Cw0LLQu9C+0LI=?= , "Edgar E. Iglesias" On 27/05/2016 04:13, xiaoqiang zhao wrote: >=20 >=20 > =E5=9C=A8 2016=E5=B9=B405=E6=9C=8825=E6=97=A5 21:15, Paolo Bonzini =E5=86= =99=E9=81=93: >>>>> @@ -310,8 +312,7 @@ static void pl011_class_init(ObjectClass *oc, >>>>> void *data) >>>>> >> > >>>>> >> > dc->realize =3D pl011_realize; >>>>> >> > dc->vmsd =3D &vmstate_pl011; >>>>> >> >- /* Reason: realize() method uses >>>>> qemu_char_get_next_serial() */ >>>>> >> >- dc->cannot_instantiate_with_device_add_yet =3D true; >>> >Why does instantiating with device_add work now? There's >>> >still no way to wire up interrupt lines or map mmio regions. >>> >(This has never made much sense to me -- Markus?) >> You can create it with -device if your board provides a platform bus a= nd >> there's an FDT creator function. If you don't, you get an error. >> >> Regarding device_add, it's disabled anyway because sysbus is not >> hotpluggable. >> >> Eiter way it's safe to remove this line, which is for outliers that >> otherwise would not give any error message. > Paolo: Do I need to send a new version to keep the >=20 > "dc->cannot_instantiate_with_device_add_yet =3D true" > untouched ? No, you should remove it. cannot_instantiate_with_device_add_yet is set if you cannot_instantiate_with_device_add_yet *and* there is no code elsewhere to detect that. Thanks, Paolo