From patchwork Thu May 10 00:13:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 158110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7AC29B6FA9 for ; Thu, 10 May 2012 12:00:03 +1000 (EST) Received: from localhost ([::1]:44944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH3I-0002aH-H0 for incoming@patchwork.ozlabs.org; Wed, 09 May 2012 20:16:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2A-0000a5-Qm for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSH28-0005Mj-Dd for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35541 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH27-0005It-V6 for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:04 -0400 Received: from relay2.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 DE8E4970AD for ; Thu, 10 May 2012 02:15:02 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 10 May 2012 02:13:51 +0200 Message-Id: <1336608892-30501-14-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1336608892-30501-1-git-send-email-afaerber@suse.de> References: <1336608892-30501-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH next v2 13/74] leon3: Use cpu_sparc_init() to obtain SPARCCPU X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Needed for main_cpu_reset(). Signed-off-by: Andreas Färber --- hw/leon3.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/leon3.c b/hw/leon3.c index 0a5ff16..8ffef83 100644 --- a/hw/leon3.c +++ b/hw/leon3.c @@ -101,6 +101,7 @@ static void leon3_generic_hw_init(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + SPARCCPU *cpu; CPUSPARCState *env; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); @@ -117,11 +118,12 @@ static void leon3_generic_hw_init(ram_addr_t ram_size, cpu_model = "LEON3"; } - env = cpu_init(cpu_model); - if (!env) { + cpu = cpu_sparc_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n"); exit(1); } + env = &cpu->env; cpu_sparc_set_id(env, 0);