From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VA-0000N4-3q for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3V7-0000g4-T1 for qemu-devel@nongnu.org; Sun, 06 May 2012 11:35:59 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 6 May 2012 17:34:23 +0200 Message-Id: <1336318514-30906-24-git-send-email-afaerber@suse.de> In-Reply-To: <1336318514-30906-1-git-send-email-afaerber@suse.de> References: <1336318514-30906-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 for-next 23/74] ppc_newworld: 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: Paolo Bonzini , "open list:New World" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori , Alexander Graf Needed for ppc_core99_reset(). Signed-off-by: Andreas F=C3=A4rber --- hw/ppc_newworld.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c index 8796510..6f7f1b5 100644 --- a/hw/ppc_newworld.c +++ b/hw/ppc_newworld.c @@ -136,6 +136,7 @@ static void ppc_core99_init (ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + PowerPCCPU *cpu =3D NULL; CPUPPCState *env =3D NULL; char *filename; qemu_irq *pic, **openpic_irqs; @@ -166,11 +167,13 @@ static void ppc_core99_init (ram_addr_t ram_size, cpu_model =3D "G4"; #endif 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 100 Mhz */ cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); qemu_register_reset(ppc_core99_reset, env); --=20 1.7.7