From patchwork Sun May 6 15:35:06 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: 157155 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 7CF6BB6F13 for ; Mon, 7 May 2012 04:06:56 +1000 (EST) Received: from localhost ([::1]:35828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3YD-0004my-Uw for incoming@patchwork.ozlabs.org; Sun, 06 May 2012 11:39:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VW-0001ZW-RS for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3VV-0000vn-1r for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:22 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55453 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VU-0000vA-Re for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:20 -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 B55E8A3DDC; Sun, 6 May 2012 17:36:19 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 6 May 2012 17:35:06 +0200 Message-Id: <1336318514-30906-67-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Paolo Bonzini , Aurelien Jarno , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori Subject: [Qemu-devel] [PATCH for-next 66/74] mips_malta: Use cpu_mips_init() to obtain MIPSCPU 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/mips_malta.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 4752bb2..d81e8d5 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -788,6 +788,7 @@ void mips_malta_init (ram_addr_t ram_size, int64_t kernel_entry; PCIBus *pci_bus; ISABus *isa_bus; + MIPSCPU *cpu; CPUMIPSState *env; qemu_irq *isa_irq; qemu_irq *cpu_exit_irq; @@ -825,11 +826,13 @@ void mips_malta_init (ram_addr_t ram_size, } for (i = 0; i < smp_cpus; i++) { - env = cpu_init(cpu_model); - if (!env) { + cpu = cpu_mips_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env = &cpu->env; + /* Init internal devices */ cpu_mips_irq_init_cpu(env); cpu_mips_clock_init(env);