From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STz8G-00057y-0s for qemu-devel@nongnu.org; Mon, 14 May 2012 13:32:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STz8B-0000be-OL for qemu-devel@nongnu.org; Mon, 14 May 2012 13:32:27 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49625 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STz8B-0000aK-Cp for qemu-devel@nongnu.org; Mon, 14 May 2012 13:32:23 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 14 May 2012 19:31:59 +0200 Message-Id: <1337016729-12285-13-git-send-email-afaerber@suse.de> In-Reply-To: <1337016729-12285-1-git-send-email-afaerber@suse.de> References: <1337016729-12285-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 qom-next 12/22] xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite , peter.maydell@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= The board initializes only one CPU, so replace first_cpu with that CPU's state to facilitate review of arm_load_kernel() signature change and to avoid double casts then. Signed-off-by: Andreas F=C3=A4rber --- hw/xilinx_zynq.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index 7290c64..007b4a6 100644 --- a/hw/xilinx_zynq.c +++ b/hw/xilinx_zynq.c @@ -50,7 +50,7 @@ static void zynq_init(ram_addr_t ram_size, const char *= boot_device, const char *kernel_filename, const char *kernel_= cmdline, const char *initrd_filename, const char *cpu_mod= el) { - CPUARMState *env =3D NULL; + ARMCPU *cpu; MemoryRegion *address_space_mem =3D get_system_memory(); MemoryRegion *ext_ram =3D g_new(MemoryRegion, 1); MemoryRegion *ocm_ram =3D g_new(MemoryRegion, 1); @@ -66,12 +66,12 @@ static void zynq_init(ram_addr_t ram_size, const char= *boot_device, cpu_model =3D "cortex-a9"; } =20 - env =3D cpu_init(cpu_model); - if (!env) { + cpu =3D cpu_arm_init(cpu_model); + if (!cpu) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } - irqp =3D arm_pic_init_cpu(env); + irqp =3D arm_pic_init_cpu(&cpu->env); cpu_irq =3D irqp[ARM_PIC_CPU_IRQ]; =20 /* max 2GB ram */ @@ -137,7 +137,7 @@ static void zynq_init(ram_addr_t ram_size, const char= *boot_device, zynq_binfo.nb_cpus =3D 1; zynq_binfo.board_id =3D 0xd32; zynq_binfo.loader_start =3D 0; - arm_load_kernel(first_cpu, &zynq_binfo); + arm_load_kernel(&cpu->env, &zynq_binfo); } =20 static QEMUMachine zynq_machine =3D { --=20 1.7.7