From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VQ-0001Cs-2B for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3VM-0000qK-3O for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:15 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55387 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VL-0000pc-RM for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:12 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 6 May 2012 17:34:49 +0200 Message-Id: <1336318514-30906-50-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 49/74] xtensa_lx60: Use cpu_xtensa_init() to obtain XtensaCPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori , Max Filippov Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas F=C3=A4rber --- hw/xtensa_lx60.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/xtensa_lx60.c b/hw/xtensa_lx60.c index afdef49..31f8adc 100644 --- a/hw/xtensa_lx60.c +++ b/hw/xtensa_lx60.c @@ -164,6 +164,7 @@ static void lx_init(const LxBoardDesc *board, int be =3D 0; #endif MemoryRegion *system_memory =3D get_system_memory(); + XtensaCPU *cpu =3D NULL; CPUXtensaState *env =3D NULL; MemoryRegion *ram, *rom, *system_io; DriveInfo *dinfo; @@ -175,17 +176,19 @@ static void lx_init(const LxBoardDesc *board, } =20 for (n =3D 0; n < smp_cpus; n++) { - env =3D cpu_init(cpu_model); - if (!env) { + cpu =3D cpu_xtensa_init(cpu_model); + if (cpu =3D=3D NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env =3D &cpu->env; + env->sregs[PRID] =3D n; qemu_register_reset(lx60_reset, env); /* Need MMU initialized prior to ELF loading, * so that ELF gets loaded into virtual addresses */ - cpu_state_reset(env); + cpu_reset(CPU(cpu)); } =20 ram =3D g_malloc(sizeof(*ram)); --=20 1.7.7