From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR5CT-0007vT-LD for qemu-devel@nongnu.org; Thu, 26 Feb 2015 15:38:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR5CR-00089q-D4 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 15:38:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR5CR-00089W-60 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 15:38:23 -0500 From: Eduardo Habkost Date: Thu, 26 Feb 2015 17:37:48 -0300 Message-Id: <1424983069-14080-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1424983069-14080-1-git-send-email-ehabkost@redhat.com> References: <1424983069-14080-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] unicore32: Use uc32_cpu_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?q?Andreas=20F=C3=A4rber?= Cc: Blue Swirl , Riku Voipio , Guan Xuetao , qemu-devel@nongnu.org Instead of using the legacy cpu_init() function, use uc32_cpu_init() to create a UniCore32CPU object. Signed-off-by: Eduardo Habkost Cc: Guan Xuetao --- hw/unicore32/puv3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c index c41499e..cc9a21a 100644 --- a/hw/unicore32/puv3.c +++ b/hw/unicore32/puv3.c @@ -109,6 +109,7 @@ static void puv3_init(MachineState *machine) const char *kernel_filename = machine->kernel_filename; const char *initrd_filename = machine->initrd_filename; CPUUniCore32State *env; + UniCore32CPU *cpu; if (initrd_filename) { hw_error("Please use kernel built-in initramdisk.\n"); @@ -118,10 +119,11 @@ static void puv3_init(MachineState *machine) cpu_model = "UniCore-II"; } - env = cpu_init(cpu_model); - if (!env) { + cpu = uc32_cpu_init(cpu_model); + if (!cpu) { hw_error("Unable to find CPU definition\n"); } + env = &cpu->env; puv3_soc_init(env); puv3_board_init(env, ram_size); -- 2.1.0