Received: from eggs.gnu.org ([2001:4830:134:3::10]:39490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6dxP-0005JK-Ff for qemu-devel@nongnu.org; Sun, 21 Jun 2015 08:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6dxK-0001n7-5k for qemu-devel@nongnu.org; Sun, 21 Jun 2015 08:02:39 -0400 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:32967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6dxJ-0001n2-Vu for qemu-devel@nongnu.org; Sun, 21 Jun 2015 08:02:34 -0400 Received: by padev16 with SMTP id ev16so115342960pad.0 for ; Sun, 21 Jun 2015 05:02:33 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id rx6sm16565529pbc.62.2015.06.21.05.02.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 21 Jun 2015 05:02:32 -0700 (PDT) From: "Edgar E. Iglesias" Date: Sun, 21 Jun 2015 21:56:12 +1000 Message-Id: <1434887787-4188-2-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1434887787-4188-1-git-send-email-edgar.iglesias@gmail.com> References: <1434887787-4188-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v1 01/16] microblaze: s3adsp: Instantiate CPU using QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Peter Crosthwaite Instantiate and realise the CPU directly, rather than using cpu_mb_init. Microblazes cpu_model argument is a dummy so remove the default cpu_model set logic. Reviewed-by: Edgar E. Iglesias Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index 84f6e74..4dbbd1e 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -62,7 +62,6 @@ static void petalogix_s3adsp1800_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; - const char *cpu_model = machine->cpu_model; DeviceState *dev; MicroBlazeCPU *cpu; DriveInfo *dinfo; @@ -73,11 +72,8 @@ petalogix_s3adsp1800_init(MachineState *machine) qemu_irq irq[32]; MemoryRegion *sysmem = get_system_memory(); - /* init CPUs */ - if (cpu_model == NULL) { - cpu_model = "microblaze"; - } - cpu = cpu_mb_init(cpu_model); + cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); + object_property_set_bool(OBJECT(cpu), true, "realized", &error_abort); /* Attach emulated BRAM through the LMB. */ memory_region_init_ram(phys_lmb_bram, NULL, -- 1.9.1