From nobody Tue Feb 10 02:00:52 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508926151170701.172042290455; Wed, 25 Oct 2017 03:09:11 -0700 (PDT) Received: from localhost ([::1]:47447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7IcE-0002bP-8f for importer@patchew.org; Wed, 25 Oct 2017 06:08:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7I6v-0000FM-7O for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7I6t-00008g-FL for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:29 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:56390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7I6t-00007p-95 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:27 -0400 Received: by mail-wr0-x243.google.com with SMTP id r79so23326216wrb.13 for ; Wed, 25 Oct 2017 02:36:27 -0700 (PDT) Received: from cloudburst.twiddle.net ([62.168.35.107]) by smtp.gmail.com with ESMTPSA id v23sm2751025wmh.8.2017.10.25.02.36.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 02:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z9z5nFyzQ+zfNbGl4DmTzRfqXkhjB25qxgQRhQXHqNQ=; b=RmdK6mj3R54yLLUm/cLRkHtr3FVFslnclpQWX6ZYXxEXR53X1ZhLbazVbhYBV3sGc3 U6fCP/3AGWcIZN0bp2h3l58TLxZpU9O5pspirjNIgEUxbh+12Dw9EmIMOydykzYFt+Zf pt7H9SZYJJvgsm7fPAX6g9yI2vS2CNpe/jntE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z9z5nFyzQ+zfNbGl4DmTzRfqXkhjB25qxgQRhQXHqNQ=; b=Fqd2kMoDWlHwXbeJWHwwpcitUKvS+L3aL00UTqpuw6samRPigfnRT28MZsUTm6STj3 b4+ijblMM5sweVdddg2CiDCnTuFlUBEB8RG1TENbxbhlTGFc96Z7HBm5uPteznJsPv5W QZIA/qcpyvYjGekuvO1lEwiBpi8ECWEKNj9ds8F0ARzY4lOReil/t2kN88CKp6WeeEzR D0GXhxdFX5hfe6xE0xrGVKi+ahKRtNcGVMEH19Lg63kHiHfglSavk07oJHvg3pAGvX42 0nuuG+rSZm2D/YVXQNIH+O6fUumOKseBpNU+hrTc0LV3vI/85Odfj7BtaTYU12aDyLLe 8PmA== X-Gm-Message-State: AMCzsaWNmXHNlxivGcAd5QtJABHMe0Db638L/dwgcohV36Sa39Ik5RW/ T5vDPQ/9nnIo+UmRO80G1TUgUnE4Au8= X-Google-Smtp-Source: ABhQp+Qfs8O5gC92iXiUYWjXp+Nwaf60YsRe1vOdKZnZulcI9zF/rScv8cWT9N/s5xzB50VQxX2FVg== X-Received: by 10.223.160.86 with SMTP id l22mr1487413wrl.187.1508924185943; Wed, 25 Oct 2017 02:36:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 11:35:22 +0200 Message-Id: <20171025093535.10175-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171025093535.10175-1-richard.henderson@linaro.org> References: <20171025093535.10175-1-richard.henderson@linaro.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: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 38/51] 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: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_6 Z_629925259 SPT_0 From: "Emilio G. Cota" 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 Signed-off-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 e2d598082e..923ece3e9b 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -388,7 +388,7 @@ static inline uint32_t curr_cflags(void) | (use_icount ? CF_USE_ICOUNT : 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 b44c7941aa..9b58cdee28 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -220,7 +220,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 678e5ab61e..e929ccb30b 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -373,7 +373,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; } @@ -872,7 +872,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 @@ -1811,7 +1811,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); } =20 /* TODO: If env->pc !=3D tb->pc (i.e. the faulting instruction was not --=20 2.13.6