Received: from eggs.gnu.org ([2001:4830:134:3::10]:37890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwkWz-0008FR-GY for qemu-devel@nongnu.org; Mon, 25 May 2015 01:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwkWw-00053Z-5R for qemu-devel@nongnu.org; Mon, 25 May 2015 01:02:29 -0400 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:33380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwkWv-00053M-UP for qemu-devel@nongnu.org; Mon, 25 May 2015 01:02:26 -0400 Received: by padbw4 with SMTP id bw4so63321558pad.0 for ; Sun, 24 May 2015 22:02:24 -0700 (PDT) Date: Mon, 25 May 2015 14:58:05 +1000 From: "Edgar E. Iglesias" Message-ID: <20150525045805.GF17116@toto> References: <1432524700-5058-1-git-send-email-crosthwaite.peter@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432524700-5058-1-git-send-email-crosthwaite.peter@gmail.com> Subject: Re: [Qemu-devel] [PATCH] microblaze: s3adsp: Instantiate CPU using QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: egdar.iglesias@gmail.com, alistair.francis@xilinx.com, qemu-devel@nongnu.org, afaerber@suse.de, Peter Crosthwaite On Sun, May 24, 2015 at 08:31:40PM -0700, Peter Crosthwaite wrote: > 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 I've put this in my mb queue. BTW, you've got a typo in my email address. Cheers, Edgar > > Signed-off-by: Peter Crosthwaite > --- > 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 > >