From nobody Mon Feb 9 14:50:48 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 1500236413142260.64516986597584; Sun, 16 Jul 2017 13:20:13 -0700 (PDT) Received: from localhost ([::1]:46765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWq1T-000622-Sd for importer@patchew.org; Sun, 16 Jul 2017 16:20:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWpmb-0001Ap-GO for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWpmY-0008OC-3N for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:49 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52669) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWpmX-0008Nt-Vp for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:46 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3FEF820A5C; Sun, 16 Jul 2017 16:04:45 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sun, 16 Jul 2017 16:04:45 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id F2B637E1FC; Sun, 16 Jul 2017 16:04:44 -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=jlyKV2vnjLs640+ zxh9q87ehSJQskOkqSwL2Vxkj7NY=; b=e187JNqcbrGJEMiBjuwkbqH26+Z/p+5 SKwK72tZtBL/K2ZJQvdtiBO3s+1A9YQs/Jbr7AhmSTO6H27hv+Vxm1PeoWM8Es8G S8j23ni9F1gPWOCvxfnSwJmjOYgBcq7yPBvMzZr6lEgbJcDHXUiMrrpDxaWMmZs5 qjVhbFCuC6k8= 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=jlyKV2vnjLs640+zxh9q87ehSJQskOkqSwL2Vxkj7NY=; b=fepHhHki ee++RgdHdNXuCH871JIfgOwWzuhStJ+j1hzOiavZ1gLm9aMMpgEtSPhHoVT3X+5F LYH3kC05zp5lUc5PH5Lzte4yfd4JqdLy77M6+bq0SHkWRib3xxZE2XpHFoXIzBay hmGt7iUMmCzhNMQBeV5Oc3RYg/58+Peui8QdskxKXYIkegdC1sEiOFSw7CxIiNfB iyqxd4CxOXTUVKnyvR32t/kugtcLNYsZWQkTlA+dTFyfPHWu2Nc4snvb26LGNyeC jooT7VR5UxQfKeHzISqgA+qupbMH3SI+y4E2pvQJple6WCSKPagx2oZ3fxRzyhNk VEzXdUU+lX7YlA== X-ME-Sender: X-Sasl-enc: 5ixQkOoV+yIOFRytNgBffreyVp+lEFDHStWq0DdFx6xP 1500235484 From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Sun, 16 Jul 2017 16:04:12 -0400 Message-Id: <1500235468-15341-30-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500235468-15341-1-git-send-email-cota@braap.org> References: <1500235468-15341-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 v2 29/45] 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 Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson --- 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 c7bf683..37487d7 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -408,7 +408,7 @@ static inline uint32_t curr_cf_mask(void) return val; } =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 ba36f83..604fee2 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -221,7 +221,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 7a01af0..7c6e401 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 @@ -1823,7 +1823,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