From nobody Fri Nov 7 00:57:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544680823169606.2392498066109; Wed, 12 Dec 2018 22:00:23 -0800 (PST) Received: from localhost ([::1]:50729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXK2l-0005xf-II for importer@patchew.org; Thu, 13 Dec 2018 01:00:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXJD1-00084O-W4 for qemu-devel@nongnu.org; Thu, 13 Dec 2018 00:06:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXJCz-0002Cj-5V for qemu-devel@nongnu.org; Thu, 13 Dec 2018 00:06:51 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52509) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gXJCy-0001t1-Tj for qemu-devel@nongnu.org; Thu, 13 Dec 2018 00:06:49 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B5E8921B42; Thu, 13 Dec 2018 00:05:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 13 Dec 2018 00:05:52 -0500 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 55D9F1045F; Thu, 13 Dec 2018 00:05:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=yPhCWeq8BhzwNOxKLF9DWmKqdHixWTGLXCP6jsHYBeU=; b=iMRo4 uy97t9t0RO8kWZwmggYJkX5NuZm33+7WvW8c5S5m2uztS1stb4Zp2x7nsNt5qLaL +hcLiSqlJu9PHjIZqTU4U3+jj3VheFW/s/X4Qajrd+2iK65BIhR/e5jrhSTlaMY6 LhCCWjdYdYkPiKZh7HCYNYQgizQie5jsfxNpWA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=yPhCWeq8BhzwNOxKLF9DWmKqdHixW TGLXCP6jsHYBeU=; b=H296Vs7oPO5w3vMGf1bv5CRPvXWyYvfI3OwT9ooWnYf1z 080GK79kzkExKbzYwQNTtnu4tS3Qy9575LGVijb6TyQhtMkfJVQp/bl9ZY/ex67m EGFqqSodPk5EUBmV0gV/FATn9uN43Goc/ffKqjWlAylryR832Nf3Yw9VxeQ0Cpja HbhMNneOysC/bdKMAJewahGDirfbFZGE+0uTnqh9SpDeQAwXBXLUBqyltfDJe+SX B/ROQW8d1dYdM5aOmM1MVeciG4Bx7AmOC/kz7ThkKBmafcVt4Kd2T8DBDfOygSMV Q7VSXi2P4B1rtwCkLU95laeKgx0Lg7MvA09Bve/gw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudehuddgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkof gjfhestddtredtredttdenucfhrhhomhepfdfgmhhilhhiohcuifdrucevohhtrgdfuceo tghothgrsegsrhgrrghprdhorhhgqeenucfkphepuddvkedrheelrddvtddrvdduieenuc frrghrrghmpehmrghilhhfrhhomheptghothgrsegsrhgrrghprdhorhhgnecuvehluhhs thgvrhfuihiivgepudel X-ME-Proxy: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 00:04:49 -0500 Message-Id: <20181213050453.9677-70-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213050453.9677-1-cota@braap.org> References: <20181213050453.9677-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v5 69/73] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This function is only called from TCG rr mode, so add a prefix to mark this as well as an assertion. Signed-off-by: Emilio G. Cota --- cpus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index fa66d84bc7..b89d3790d7 100644 --- a/cpus.c +++ b/cpus.c @@ -211,10 +211,12 @@ static bool cpu_thread_is_idle(CPUState *cpu) return true; } =20 -static bool all_cpu_threads_idle(void) +static bool qemu_tcg_rr_all_cpu_threads_idle(void) { CPUState *cpu; =20 + g_assert(qemu_is_tcg_rr()); + CPU_FOREACH(cpu) { if (!cpu_thread_is_idle(cpu)) { return false; @@ -692,7 +694,7 @@ void qemu_start_warp_timer(void) } =20 if (replay_mode !=3D REPLAY_MODE_PLAY) { - if (!all_cpu_threads_idle()) { + if (!qemu_tcg_rr_all_cpu_threads_idle()) { return; } =20 @@ -1325,7 +1327,7 @@ static void qemu_tcg_rr_wait_io_event(void) { CPUState *cpu; =20 - while (all_cpu_threads_idle()) { + while (qemu_tcg_rr_all_cpu_threads_idle()) { stop_tcg_kick_timer(); qemu_cond_wait(first_cpu->halt_cond, &qemu_global_mutex); } @@ -1659,7 +1661,7 @@ static void *qemu_tcg_rr_cpu_thread_fn(void *arg) atomic_mb_set(&cpu->exit_request, 0); } =20 - if (use_icount && all_cpu_threads_idle()) { + if (use_icount && qemu_tcg_rr_all_cpu_threads_idle()) { /* * When all cpus are sleeping (e.g in WFI), to avoid a deadlock * in the main_loop, wake it up in order to start the warp tim= er. --=20 2.17.1