From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2G-0000rd-Ej for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSH2D-0005VA-QA for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:11 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 10 May 2012 02:14:03 +0200 Message-Id: <1336608892-30501-26-git-send-email-afaerber@suse.de> In-Reply-To: <1336608892-30501-1-git-send-email-afaerber@suse.de> References: <1336608892-30501-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] [PATCH next v2 25/74] ppc_oldworld: Use cpu_ppc_init() to obtain PowerPCCPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "open list:Old World" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf Needed for ppc_heathrow_reset(). Signed-off-by: Andreas F=C3=A4rber --- hw/ppc_oldworld.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index 7e73d37..ba8f3ad 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -80,6 +80,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, const char *cpu_model) { MemoryRegion *sysmem =3D get_system_memory(); + PowerPCCPU *cpu =3D NULL; CPUPPCState *env =3D NULL; char *filename; qemu_irq *pic, **heathrow_irqs; @@ -104,11 +105,13 @@ static void ppc_heathrow_init (ram_addr_t ram_size, if (cpu_model =3D=3D NULL) cpu_model =3D "G3"; for (i =3D 0; i < smp_cpus; i++) { - env =3D cpu_init(cpu_model); - if (!env) { + cpu =3D cpu_ppc_init(cpu_model); + if (cpu =3D=3D NULL) { fprintf(stderr, "Unable to find PowerPC CPU definition\n"); exit(1); } + env =3D &cpu->env; + /* Set time-base frequency to 16.6 Mhz */ cpu_ppc_tb_init(env, 16600000UL); qemu_register_reset(ppc_heathrow_reset, env); --=20 1.7.7