From nobody Mon Feb 9 09:33:20 2026 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 1500521083541905.1302134576986; Wed, 19 Jul 2017 20:24:43 -0700 (PDT) Received: from localhost ([::1]:35858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY24v-0007TQ-OR for importer@patchew.org; Wed, 19 Jul 2017 23:24:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY1qP-00016l-5z for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dY1qL-0005sI-5L for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:41 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55933) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dY1qL-0005rv-1g for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:37 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9E9F320B61; Wed, 19 Jul 2017 23:09:36 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 19 Jul 2017 23:09:36 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 654FD7E057; Wed, 19 Jul 2017 23:09:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Lx575OXlm/fnh8I 8yvFhoOvFJdD+y31o6+ltKwk9yiI=; b=RCT5IUEAw0lhS+OLRp7ul+1glwyDu0f 3o+U25gsanzWvPH3lW7buDFVdY/80uHsZcepqROpojFObzkZlsA0f9i9C/7VfUUD FT8xJkBjKhnJqHlMco4sEBe5ffVkItCA51yRPWbXgV0LarTnW2thQq4NXLbFuYSO aKrOsVy8rVIs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=Lx575OXlm/fnh8I8yvFhoOvFJdD+y31o6+ltKwk9yiI=; b=qQt/hfmz epZAfauCYTnRNjrOgV2YIWlQ9Nmyg+lNhit5jsxhn6HZ6p2fSVch3X8T3QtrJRk3 ixuvuubySbN4SU6+Q9Ak4XTVFAKmet8PxPA+z7uptTUySXvK/pwx1/Y5SMPUlqxO 9Qi84d1Ny2yI59nfmrOtoxzdyCyM8C3/fcYDKabn8nsv6UekStDOl1PVcP9XtYy2 xjLkBM9jzpwwHaW1Yjv++aHXQJ6MyIu9lqJONCCMHg+5C5qvXJA5RMOUGZfF4bVM wii5x+2LHk2sikMZMm9NtW5o+ARi+B9C4z79xsVyUCzyGpH+5yxE042gOxRq2Nni 1j/u1vMT59HCDg== X-ME-Sender: X-Sasl-enc: +6whNcFRnipuhewT1/48FpCAii7Q6h4fskzTg4+ITCOS 1500520176 From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Wed, 19 Jul 2017 23:09:14 -0400 Message-Id: <1500520169-23367-29-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500520169-23367-1-git-send-email-cota@braap.org> References: <1500520169-23367-1-git-send-email-cota@braap.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 v3 28/43] exec-all: rename tb_free to tb_remove 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 We don't really free anything in this function anymore; we just remove the TB from the binary search tree. Suggested-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 2 +- accel/tcg/cpu-exec.c | 2 +- accel/tcg/translate-all.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index eb3eb7b..7bc2050 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -428,7 +428,7 @@ static inline uint32_t curr_cflags(void) return parallel_cpus ? CF_PARALLEL : 0; } =20 -void tb_free(TranslationBlock *tb); +void tb_remove(TranslationBlock *tb); void tb_flush(CPUState *cpu); void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc, diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index cb1e6d3..1963bda 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -218,7 +218,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cyc= les, =20 tb_lock(); tb_phys_invalidate(tb, -1); - tb_free(tb); + tb_remove(tb); tb_unlock(); } #endif diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index cb71aef..448f13b 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -375,7 +375,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr) if (tb->cflags & CF_NOCACHE) { /* one-shot translation, invalidate it immediately */ tb_phys_invalidate(tb, -1); - tb_free(tb); + tb_remove(tb); } r =3D true; } @@ -874,7 +874,7 @@ static TranslationBlock *tb_alloc(target_ulong pc) } =20 /* Called with tb_lock held. */ -void tb_free(TranslationBlock *tb) +void tb_remove(TranslationBlock *tb) { assert_tb_locked(); =20 @@ -1809,7 +1809,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retadd= r) * cpu_exec_nocache() */ tb_phys_invalidate(tb->orig_tb, -1); } - tb_free(tb); + tb_remove(tb); } /* FIXME: In theory this could raise an exception. In practice we have already translated the block once so it's probably ok. */ --=20 2.7.4