From patchwork Thu May 10 00:14:45 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: 158150 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 769FDB6FA4 for ; Thu, 10 May 2012 12:54:58 +1000 (EST) Received: from localhost ([::1]:50964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH5G-0005gp-EO for incoming@patchwork.ozlabs.org; Wed, 09 May 2012 20:18:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2a-0001tT-BM for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSH2X-0005k4-MT for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:31 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35646 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2X-0005jI-Fz for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:29 -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 6C653979ED; Thu, 10 May 2012 02:15:28 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 10 May 2012 02:14:45 +0200 Message-Id: <1336608892-30501-68-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?= , Aurelien Jarno Subject: [Qemu-devel] [PATCH next v2 67/74] mips_malta: Pass MIPSCPU to main_cpu_reset() 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 Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber --- hw/mips_malta.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index d81e8d5..dfd7b6b 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -751,8 +751,10 @@ static void malta_mips_config(CPUMIPSState *env) static void main_cpu_reset(void *opaque) { - CPUMIPSState *env = opaque; - cpu_state_reset(env); + MIPSCPU *cpu = opaque; + CPUMIPSState *env = &cpu->env; + + cpu_reset(CPU(cpu)); /* The bootloader does not need to be rewritten as it is located in a read only location. The kernel location and the arguments table @@ -836,7 +838,7 @@ void mips_malta_init (ram_addr_t ram_size, /* Init internal devices */ cpu_mips_irq_init_cpu(env); cpu_mips_clock_init(env); - qemu_register_reset(main_cpu_reset, env); + qemu_register_reset(main_cpu_reset, cpu); } env = first_cpu;