From patchwork Wed Oct 31 00:59:54 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: 195715 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 B5A272C0084 for ; Wed, 31 Oct 2012 13:48:16 +1100 (EST) Received: from localhost ([::1]:37021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMgu-0001WS-2d for incoming@patchwork.ozlabs.org; Tue, 30 Oct 2012 21:01:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMft-0008VZ-Je for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTMfo-0005Of-V1 for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52412 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfo-0005NZ-Ox for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:48 -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 022D2A3DDD; Wed, 31 Oct 2012 02:00:46 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Wed, 31 Oct 2012 01:59:54 +0100 Message-Id: <1351645206-3041-24-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351645206-3041-1-git-send-email-afaerber@suse.de> References: <1351645206-3041-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?= , anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH 23/35] cpus: Pass CPUState to qemu_wait_io_event_common() 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 CPUArchState is no longer needed there. Signed-off-by: Andreas Färber --- cpus.c | 12 +++++------- 1 Datei geändert, 5 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-) diff --git a/cpus.c b/cpus.c index e40823c..6baf2bc 100644 --- a/cpus.c +++ b/cpus.c @@ -687,10 +687,8 @@ static void flush_queued_work(CPUState *cpu) qemu_cond_broadcast(&qemu_work_cond); } -static void qemu_wait_io_event_common(CPUArchState *env) +static void qemu_wait_io_event_common(CPUState *cpu) { - CPUState *cpu = ENV_GET_CPU(env); - if (cpu->stop) { cpu->stop = false; cpu->stopped = true; @@ -716,7 +714,7 @@ static void qemu_tcg_wait_io_event(void) } for (env = first_cpu; env != NULL; env = env->next_cpu) { - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(ENV_GET_CPU(env)); } } @@ -729,7 +727,7 @@ static void qemu_kvm_wait_io_event(CPUArchState *env) } qemu_kvm_eat_signals(env); - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(cpu); } static void *qemu_kvm_cpu_thread_fn(void *arg) @@ -804,7 +802,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg) } qemu_mutex_lock_iothread(); cpu_single_env = env; - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(cpu); } return NULL; @@ -836,7 +834,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) /* process any pending work */ for (env = first_cpu; env != NULL; env = env->next_cpu) { - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(ENV_GET_CPU(env)); } }