From patchwork Fri Jul 15 17:58:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sergey.fedorov@linaro.org X-Patchwork-Id: 9232407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8F5A60865 for ; Fri, 15 Jul 2016 18:05:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE52627F8F for ; Fri, 15 Jul 2016 18:05:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B32A527F96; Fri, 15 Jul 2016 18:05:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 31D6527F8F for ; Fri, 15 Jul 2016 18:05:39 +0000 (UTC) Received: from localhost ([::1]:34153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO7UX-00016n-Qu for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Jul 2016 14:05:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO7OQ-0002qt-Po for qemu-devel@nongnu.org; Fri, 15 Jul 2016 13:59:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO7OO-00075P-Ip for qemu-devel@nongnu.org; Fri, 15 Jul 2016 13:59:17 -0400 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:35688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO7OO-00075F-B4 for qemu-devel@nongnu.org; Fri, 15 Jul 2016 13:59:16 -0400 Received: by mail-lf0-x230.google.com with SMTP id f93so93477195lfi.2 for ; Fri, 15 Jul 2016 10:59:16 -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; bh=PIfHZNHW6ry++t/ZnRYKw4A9g6MlsuxffKatbMjFwio=; b=YDZLx8HObPv0q2n9RprOs0UQsoVQtGGsnjlXhaWiEneuLiV4BHVpXYNtX8OlI4KRP7 PZpnFkJeHglbYe4Jm0fa2CIeL2+6RkSUEBPWnQ+Zvqn/l9lWRhVjnKpRGbIRtOIzYi3f LgLQvrk7oueRlalVGl9zDHBr6I0Kmumeu9QXA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PIfHZNHW6ry++t/ZnRYKw4A9g6MlsuxffKatbMjFwio=; b=fXrYmpYk91uiz1graeFTclN2Rs9rXVJUlaF2rF/Q2HiuAPOpgM8g65I2speUQejb/Y sf/v53RwbyIg1ygCARs04Gx7epnZWlVF8NWlrPs9oAs9A+xox3ylyfxOQruoyWvhV5d8 D7RaBTaLh01zw3AA4FLOQgHUwZHaZno4lxzdW3abZdr4caG6KonYQJJXc2aWU7c7Ff9F SqtLbu9o9SevPfiMxeHevQQJi3vWFw/c0UkICCEOOpSJbhknLTHRSIltPhKTdmpaxLfP KfuTZE1s4IntNnUFCIoEt7ZR4JWYxbnvnHIQ8/qnoMQBRp0dpVISSFIS32pUMrC+agZZ gj1w== X-Gm-Message-State: ALyK8tKv+IG3MIbeyGZ6oFlj0bFXmrDK0l2A1aeGSmCwlsGPKoEVdG6R4j5T/3Jf6e+UJQNM X-Received: by 10.25.33.134 with SMTP id h128mr9926256lfh.82.1468605555469; Fri, 15 Jul 2016 10:59:15 -0700 (PDT) Received: from sergey-laptop.Dlink (broadband-46-188-120-37.2com.net. [46.188.120.37]) by smtp.gmail.com with ESMTPSA id g193sm2113268lfb.14.2016.07.15.10.59.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 10:59:14 -0700 (PDT) From: Sergey Fedorov To: qemu-devel@nongnu.org Date: Fri, 15 Jul 2016 20:58:52 +0300 Message-Id: <20160715175852.30749-13-sergey.fedorov@linaro.org> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20160715175852.30749-1-sergey.fedorov@linaro.org> References: <20160715175852.30749-1-sergey.fedorov@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::230 Subject: [Qemu-devel] [PATCH v4 12/12] tcg: rename tb_find_physical() 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: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, Sergey Fedorov , patches@linaro.org, jan.kiszka@siemens.com, Peter Crosthwaite , mark.burton@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, pbonzini@redhat.com, Sergey Fedorov , bobby.prani@gmail.com, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sergey Fedorov In fact, this function does not exactly perform a lookup by physical address as it is descibed for comment on get_page_addr_code(). Thus it may be a bit confusing to have "physical" in it's name. So rename it to tb_htable_lookup() to better reflect its actual functionality. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- cpu-exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index ff138809046c..735541e753fb 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -259,7 +259,7 @@ static bool tb_cmp(const void *p, const void *d) return false; } -static TranslationBlock *tb_find_physical(CPUState *cpu, +static TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc, target_ulong cs_base, uint32_t flags) @@ -296,7 +296,7 @@ static inline TranslationBlock *tb_find(CPUState *cpu, if (unlikely(!tb || atomic_read(&tb->pc) != pc || atomic_read(&tb->cs_base) != cs_base || atomic_read(&tb->flags) != flags)) { - tb = tb_find_physical(cpu, pc, cs_base, flags); + tb = tb_htable_lookup(cpu, pc, cs_base, flags); if (!tb) { /* mmap_lock is needed by tb_gen_code, and mmap_lock must be @@ -310,7 +310,7 @@ static inline TranslationBlock *tb_find(CPUState *cpu, /* There's a chance that our desired tb has been translated while * taking the locks so we check again inside the lock. */ - tb = tb_find_physical(cpu, pc, cs_base, flags); + tb = tb_htable_lookup(cpu, pc, cs_base, flags); if (!tb) { /* if no translated code available, then translate it now */ tb = tb_gen_code(cpu, pc, cs_base, flags, 0);