From patchwork Tue Jun 5 01:21:53 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: 162917 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 5D475B6F9D for ; Tue, 5 Jun 2012 12:12:25 +1000 (EST) Received: from localhost ([::1]:35633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiVw-000468-1X for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2012 21:24:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiV0-0002bS-NT for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbiUy-0008FW-R6 for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52700 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiUy-0008F5-LI for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:52 -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 8EB579141C for ; Tue, 5 Jun 2012 03:23:51 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 5 Jun 2012 03:21:53 +0200 Message-Id: <1338859366-20689-22-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1338859366-20689-1-git-send-email-afaerber@suse.de> References: <1338859366-20689-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?= Subject: [Qemu-devel] [PATCH 21/74] cris-boot: Pass CRISCPU 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 Acked-by: Edgar E. Iglesias --- hw/cris-boot.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/cris-boot.c b/hw/cris-boot.c index 331b2d1..b21326f 100644 --- a/hw/cris-boot.c +++ b/hw/cris-boot.c @@ -29,12 +29,13 @@ static void main_cpu_reset(void *opaque) { - CPUCRISState *env = opaque; + CRISCPU *cpu = opaque; + CPUCRISState *env = &cpu->env; struct cris_load_info *li; li = env->load_info; - cpu_state_reset(env); + cpu_reset(CPU(cpu)); if (!li) { /* nothing more to do. */ @@ -93,5 +94,5 @@ void cris_load_image(CRISCPU *cpu, struct cris_load_info *li) } pstrcpy_targphys("cmdline", 0x40000000, 256, li->cmdline); } - qemu_register_reset(main_cpu_reset, env); + qemu_register_reset(main_cpu_reset, cpu); }