From patchwork Fri Oct 20 23:20:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 116573 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2237014qgn; Fri, 20 Oct 2017 16:47:18 -0700 (PDT) X-Received: by 10.237.63.15 with SMTP id p15mr9935996qtf.155.1508543238653; Fri, 20 Oct 2017 16:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508543238; cv=none; d=google.com; s=arc-20160816; b=XToMZU9regyCJ9UeZqRiVrm8Sw78bzUsN3c4wo9b+hHy8YCQWzNkYgouZBvIgD/6QG +XR3jn5uAcGV87YNJmwFQnZaDCippwIhNDuPwyK38S24d1fxV+1HppRMwjPSFj9g7xEe ofMpE/1Nn1gFuwDusm42DPWf+vonA1GgtWIVRq785M1CBAKc4sLfM4+kBGNpPBs63JfA Gz5FWi9csv7pPdGq/GRRMT8MDNOHbU/dRly+IT3eggL2lOx2m88nSAWnx+8ylXeH6EMP Z3x2p7HY857h5Puv2yvMnBW/1zGBUURZUQZsYH0ti5wE3hr/SHuWKjtdH6l9HFuba0a/ OxOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=z9z5nFyzQ+zfNbGl4DmTzRfqXkhjB25qxgQRhQXHqNQ=; b=y7IW8CK/2xGgo4W8aKKTM/5CkwP6kq3QmbBQAGzlYNyZskJDwlHvvVfTfcIYr8sfzq iLnblpVytFzxt5Gf2pRAG1Lh/WLZmljXi/pZvqZWiIiaJla5vluV0yB+3rvcpdiROgO+ AdSCxIXYekFNFq2X6Y5l9AWXvcNiVdweuzXsR28BiuwS9Xfay1pMuoXEA0OdaWu9s9/S U0V1smoX8AasLcEsx4a2uO6BotpcCvkqhh+ufltTxbHTxJ2104kmWjTHtz1R6M7t10aS 3eob049PkXtroB5GtpjaKW4gYy16H2TMn6TmoQ2ic4HbzmphVLxcnSc9d2QJqZ7xw+tO WnxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jWIk5iW3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id m3si1189439qkl.59.2017.10.20.16.47.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Oct 2017 16:47:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jWIk5iW3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5h0W-0004Fh-Hb for patch@linaro.org; Fri, 20 Oct 2017 19:47:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5gbU-0006U5-ML for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5gbT-0007v8-81 for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:21:24 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:55381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5gbT-0007um-13 for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:21:23 -0400 Received: by mail-pf0-x242.google.com with SMTP id 17so13067646pfn.12 for ; Fri, 20 Oct 2017 16:21:22 -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=jWIk5iW3uYErVAB728Ym4EfUD3cjXg47vbWeMM9DNB7ZAP3prQ42rFc0YZ1b1aCfXL qnHnM12Af79znJGosEj7ugeYMiS05iiUJgf8N/aO6BElSZs2ttMwA826DxHNQckYRuFd BTCWZWwwa5E1c+EyVrSJuj5x1UxU3xSNy+JXM= 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=K5sLAb0uFU6kioX9EI/YnoTFOjywVu/t+TNsrl2wY9KioV+1Q+7Tgp0te4JXY3FWCE SNwcEIaMOEDT86cIDK8TxLkTCPnqzVuw2SLuBfWP+jhBPD8Jn+cPEGSzEP2HjujbqzwF qPcpbGntQt7zk6Fe84a5R/HBqynuhMSHwjRYHW01GxZcEp3Y0kjxSXSU7JWjKpPUq1et d9uRAEkoVldydzjpNk8seos4fXobQ2ToF/mcRHugzycfYoTSTgf3DVVxqZG5iAUxq2YP W6yr9flLNuLDeqrna809OEqNwRfM+ksoT15YyNCYY3lWO3JZQly4VVcU5gsZHXLmaOxg oHhQ== X-Gm-Message-State: AMCzsaUrTY9zAKz1eptQlMngM4bBsP6/3VGOlZVYnQ/wL2yfSE+Cp2nu LGq2airoiiDpLTPTspsZDCoM0XycUKU= X-Google-Smtp-Source: ABhQp+SriGNwYG5KCDcbG3bkp1K3TUxZEgB21d2uTDRNFxuRNtryzFUBoV32phiKw7h8eCPREPeFpA== X-Received: by 10.98.34.22 with SMTP id i22mr6319579pfi.340.1508541681858; Fri, 20 Oct 2017 16:21:21 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-165-104.tukw.qwest.net. [97.113.165.104]) by smtp.gmail.com with ESMTPSA id a17sm3532594pfk.173.2017.10.20.16.21.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 16:21:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 20 Oct 2017 16:20:10 -0700 Message-Id: <20171020232023.15010-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171020232023.15010-1-richard.henderson@linaro.org> References: <20171020232023.15010-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH v7 39/52] 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: pbonzini@redhat.com, cota@braap.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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(-) -- 2.13.6 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); } -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_cycles, 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 = true; } @@ -872,7 +872,7 @@ static TranslationBlock *tb_alloc(target_ulong pc) } /* Called with tb_lock held. */ -void tb_free(TranslationBlock *tb) +void tb_remove(TranslationBlock *tb) { assert_tb_locked(); @@ -1811,7 +1811,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) * cpu_exec_nocache() */ tb_phys_invalidate(tb->orig_tb, -1); } - tb_free(tb); + tb_remove(tb); } /* TODO: If env->pc != tb->pc (i.e. the faulting instruction was not