From patchwork Thu May 10 00:14:23 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: 158131 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 E5953B6FA4 for ; Thu, 10 May 2012 12:30:53 +1000 (EST) Received: from localhost ([::1]:50913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH58-0005g2-Ag for incoming@patchwork.ozlabs.org; Wed, 09 May 2012 20:18:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2P-0001Mx-Vr for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSH2N-0005cs-6u for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35597 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2N-0005bj-05 for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:19 -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 E1DD197719; Thu, 10 May 2012 02:15:17 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 10 May 2012 02:14:23 +0200 Message-Id: <1336608892-30501-46-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: Michael Walle , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH next v2 45/74] milkymist: Store LM32 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/milkymist.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/milkymist.c b/hw/milkymist.c index 59f37b4..2e7235b 100644 --- a/hw/milkymist.c +++ b/hw/milkymist.c @@ -37,7 +37,7 @@ #define KERNEL_LOAD_ADDR 0x40000000 typedef struct { - CPULM32State *env; + LM32CPU *cpu; target_phys_addr_t bootstrap_pc; target_phys_addr_t flash_base; target_phys_addr_t initrd_base; @@ -59,9 +59,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 = reset_info->bootstrap_pc; @@ -108,7 +108,7 @@ milkymist_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; cpu_lm32_set_phys_msb_ignore(env, 1);