From patchwork Sun May 6 15:34:43 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: 157100 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 C29B3B6FAF for ; Mon, 7 May 2012 02:21:32 +1000 (EST) Received: from localhost ([::1]:35320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3Xk-0004XD-Sh for incoming@patchwork.ozlabs.org; Sun, 06 May 2012 11:38:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VK-0000ua-Sp for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3VI-0000nh-QB for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55361 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VI-0000mh-KL for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:08 -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 7D09699C82; Sun, 6 May 2012 17:36:07 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 6 May 2012 17:34:43 +0200 Message-Id: <1336318514-30906-44-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 , Michael Walle , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori Subject: [Qemu-devel] [PATCH for-next 43/74] lm32_boards: Store LM32CPU in ResetInfo 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() in main_cpu_reset(). Signed-off-by: Andreas Färber Acked-by: Michael Walle --- hw/lm32_boards.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/lm32_boards.c b/hw/lm32_boards.c index ffb273c..b76d800 100644 --- a/hw/lm32_boards.c +++ b/hw/lm32_boards.c @@ -31,7 +31,7 @@ #include "exec-memory.h" typedef struct { - CPULM32State *env; + LM32CPU *cpu; target_phys_addr_t bootstrap_pc; target_phys_addr_t flash_base; target_phys_addr_t hwsetup_base; @@ -54,9 +54,9 @@ static void cpu_irq_handler(void *opaque, int irq, int level) static void main_cpu_reset(void *opaque) { ResetInfo *reset_info = opaque; - CPULM32State *env = reset_info->env; + CPULM32State *env = &reset_info->cpu->env; - cpu_state_reset(env); + cpu_reset(CPU(reset_info->cpu)); /* init defaults */ env->pc = (uint32_t)reset_info->bootstrap_pc; @@ -104,7 +104,7 @@ static void lm32_evr_init(ram_addr_t ram_size_not_used, } cpu = cpu_lm32_init(cpu_model); env = &cpu->env; - reset_info->env = env; + reset_info->cpu = cpu; reset_info->flash_base = flash_base; @@ -201,7 +201,7 @@ static void lm32_uclinux_init(ram_addr_t ram_size_not_used, } cpu = cpu_lm32_init(cpu_model); env = &cpu->env; - reset_info->env = env; + reset_info->cpu = cpu; reset_info->flash_base = flash_base;