Received: from eggs.gnu.org ([208.118.235.92]:36678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiVO-0003YF-Op for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbiVM-0008Oa-Fr for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:24:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52757 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiVM-0008O1-8r for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:24:16 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 30A8D91C69 for ; Tue, 5 Jun 2012 03:24:15 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 5 Jun 2012 03:22:20 +0200 Message-Id: <1338859366-20689-49-git-send-email-afaerber@suse.de> In-Reply-To: <1338859366-20689-1-git-send-email-afaerber@suse.de> References: <1338859366-20689-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 48/74] spapr: 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: =?UTF-8?q?Andreas=20F=C3=A4rber?= Needed for spapr_cpu_reset(). Signed-off-by: Andreas F=C3=A4rber Acked-by: Alexander Graf --- hw/spapr.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c index cca20f9..2672330 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -518,6 +518,7 @@ static void ppc_spapr_init(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + PowerPCCPU *cpu; CPUPPCState *env; int i; MemoryRegion *sysmem =3D get_system_memory(); @@ -560,12 +561,13 @@ static void ppc_spapr_init(ram_addr_t ram_size, cpu_model =3D kvm_enabled() ? "host" : "POWER7"; } 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 512 MHz */ cpu_ppc_tb_init(env, TIMEBASE_FREQ); qemu_register_reset(spapr_cpu_reset, env); --=20 1.7.7