Received: from eggs.gnu.org ([208.118.235.92]:39375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvLcj-0003DY-Ic for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvLci-0007xj-Bk for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:17 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59574 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvLci-0007xa-6P for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:16 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 16 Jan 2013 06:32:46 +0100 Message-Id: <1358314380-9400-2-git-send-email-afaerber@suse.de> In-Reply-To: <1358314380-9400-1-git-send-email-afaerber@suse.de> References: <1358314380-9400-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC qom-cpu 01/15] target-alpha: Update CPU to QOM realizefn List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson Update the alpha_cpu_realize() signature and hook up to DeviceClass::realize. Set realized =3D true in cpu_alpha_init(). qapi/error.h is included through qdev now and no longer needed. Signed-off-by: Andreas F=C3=A4rber --- target-alpha/cpu.c | 15 +++++++++++---- 1 Datei ge=C3=A4ndert, 11 Zeilen hinzugef=C3=BCgt(+), 4 Zeilen entfernt(= -) diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c index 40e9809..3ce509c 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -21,12 +21,11 @@ =20 #include "cpu.h" #include "qemu-common.h" -#include "qapi/error.h" =20 =20 -static void alpha_cpu_realize(Object *obj, Error **errp) +static void alpha_cpu_realizefn(DeviceState *dev, Error **errp) { - AlphaCPU *cpu =3D ALPHA_CPU(obj); + AlphaCPU *cpu =3D ALPHA_CPU(dev); =20 qemu_init_vcpu(&cpu->env); } @@ -130,7 +129,7 @@ AlphaCPU *cpu_alpha_init(const char *cpu_model) =20 env->cpu_model_str =3D cpu_model; =20 - alpha_cpu_realize(OBJECT(cpu), NULL); + object_property_set_bool(OBJECT(cpu), true, "realized", NULL); return cpu; } =20 @@ -244,6 +243,13 @@ static void alpha_cpu_initfn(Object *obj) env->fen =3D 1; } =20 +static void alpha_cpu_class_init(ObjectClass *oc, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(oc); + + dc->realize =3D alpha_cpu_realizefn; +} + static const TypeInfo alpha_cpu_type_info =3D { .name =3D TYPE_ALPHA_CPU, .parent =3D TYPE_CPU, @@ -251,6 +257,7 @@ static const TypeInfo alpha_cpu_type_info =3D { .instance_init =3D alpha_cpu_initfn, .abstract =3D true, .class_size =3D sizeof(AlphaCPUClass), + .class_init =3D alpha_cpu_class_init, }; =20 static void alpha_cpu_register_types(void) --=20 1.7.10.4