From patchwork Sun May 6 15:34:32 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: 157112 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 6C819B6FAF for ; Mon, 7 May 2012 03:05:03 +1000 (EST) Received: from localhost ([::1]:34773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3XY-0004Ff-Gw for incoming@patchwork.ozlabs.org; Sun, 06 May 2012 11:38:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VE-0000bR-Kj for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3VC-0000ix-Un for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55316 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VC-0000iG-Ow; Sun, 06 May 2012 11:36:02 -0400 Received: from relay1.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 68007A3DE3; Sun, 6 May 2012 17:36:01 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 6 May 2012 17:34:32 +0200 Message-Id: <1336318514-30906-33-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 , qemu-ppc , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori , Alexander Graf Subject: [Qemu-devel] [PATCH for-next 32/74] cpu-exec: Use cpu_reset() in cpu_exec() for TARGET_PPC 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 CPUState will be needed for all targets in the future, so place it into the main variable declaration block. Signed-off-by: Andreas Färber Cc: Alexander Graf Cc: qemu-ppc --- cpu-exec.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index fbb39cb..83cac93 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -184,6 +184,9 @@ volatile sig_atomic_t exit_request; int cpu_exec(CPUArchState *env) { +#ifdef TARGET_PPC + CPUState *cpu = ENV_GET_CPU(env); +#endif int ret, interrupt_request; TranslationBlock *tb; uint8_t *tc_ptr; @@ -341,7 +344,7 @@ int cpu_exec(CPUArchState *env) } #elif defined(TARGET_PPC) if ((interrupt_request & CPU_INTERRUPT_RESET)) { - cpu_state_reset(env); + cpu_reset(cpu); } if (interrupt_request & CPU_INTERRUPT_HARD) { ppc_hw_interrupt(env);