From patchwork Thu May 10 00:13:50 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: 158121 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 6F322B6FA1 for ; Thu, 10 May 2012 12:19:41 +1000 (EST) Received: from localhost ([::1]:44927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH36-0002Yd-9u for incoming@patchwork.ozlabs.org; Wed, 09 May 2012 20:16:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH2A-0000Zc-MN for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSH28-0005L2-0h for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35539 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSH27-0005Hk-IA for qemu-devel@nongnu.org; Wed, 09 May 2012 20:15:03 -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 7BDCC977E6; 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:50 +0200 Message-Id: <1336608892-30501-13-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: Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH next v2 12/74] sun4u: Store SPARCCPU in ResetData 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 We can now use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber --- hw/sun4u.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index df1aada..feede80 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -334,7 +334,7 @@ static void cpu_set_ivec_irq(void *opaque, int irq, int level) } typedef struct ResetData { - CPUSPARCState *env; + SPARCCPU *cpu; uint64_t prom_addr; } ResetData; @@ -387,10 +387,10 @@ static void cpu_timer_reset(CPUTimer *timer) static void main_cpu_reset(void *opaque) { ResetData *s = (ResetData *)opaque; - CPUSPARCState *env = s->env; + CPUSPARCState *env = &s->cpu->env; static unsigned int nr_resets; - cpu_state_reset(env); + cpu_reset(CPU(s->cpu)); cpu_timer_reset(env->tick); cpu_timer_reset(env->stick); @@ -774,7 +774,7 @@ static SPARCCPU *cpu_devinit(const char *cpu_model, const struct hwdef *hwdef) hstick_frequency, TICK_INT_DIS); reset_info = g_malloc0(sizeof(ResetData)); - reset_info->env = env; + reset_info->cpu = cpu; reset_info->prom_addr = hwdef->prom_addr; qemu_register_reset(main_cpu_reset, reset_info);