From patchwork Tue Jul 19 08:32:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9236393 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 825EC60574 for ; Tue, 19 Jul 2016 08:41:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71E7E2015F for ; Tue, 19 Jul 2016 08:41:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65418205AF; Tue, 19 Jul 2016 08:41:36 +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 E95352015F for ; Tue, 19 Jul 2016 08:41:35 +0000 (UTC) Received: from localhost ([::1]:53829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQar-0000vr-JG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Jul 2016 04:41:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQSF-0003cZ-5D for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQSD-0002tp-0r for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:32:37 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQSC-0002tl-Qk for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:32:36 -0400 Received: by mail-wm0-x241.google.com with SMTP id i5so2012128wmg.2 for ; Tue, 19 Jul 2016 01:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=C6WFMUPaa9KCRKNtvzBcB6Cz4JmludVi8n037f42pWw=; b=VJfQF5vvsYC6yxi3rfgiCJzYC4VL3105l88KhsCrVXN4ECqvGFCmPD3js+19SGO+2f s/KDuD5woTYFJDWQIAyxHmtKywDQ6Mso36NZ/49tVUoIS52cwql02Y1JrL/+En2EWo1g cWwRbZW3GGnWKNgANGqJLLFMxuMVqDQN56BTTbYEmgZn4wbxZSM8HRfpuNODIFlVmSmX u76v0alGfdrs6v6YYesiacA2wLVNu+Iariq1Nym+RF2NDnhVF5l+8yMmDM/7ZN7w/bj8 co0pBOroGYvxBExVNOiZS9SEo7jmRqv1VpA41scKFLPhI2G+u8tFfMN41tWPcNE/qrvG 9dMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=C6WFMUPaa9KCRKNtvzBcB6Cz4JmludVi8n037f42pWw=; b=ch34GrkBC4L8/EDyInUN4OerVVlK6cSAi9kyNVfcKpqjWmmBT/GJ/iyUT7nZDhqKUR PsRFWAeVM/UN6rCuajYfdqARyLg56Jzpyfqe1AYXceT5mYZ4xdkZWWoc/PkQEG/Vksph 5CjuXF9/YnHVKG6oHBU3OEVWBIFsqJYkpyS+AO5+fKJWq+MgOC96/K7VWY3wUrQpLCTO xxm4GKb6/YGLfSd8pRQ8vNihl9hUg1BKGn5V4AmpwkFamWcXZJMZ57jHMdUl23z658L5 5y9NCjndaLx7MM8+orV8WRxy9udlUGtqinm+12uMsyr7+KZF3VeZYHM0/q1+R/mVJhlr VPHg== X-Gm-Message-State: ALyK8tLu3KQFZCX8VW4CEBKAyz9gINwzuaqSrB4oKnRBa7ORtke8yYMjT87itv/ce7TlMg== X-Received: by 10.194.66.71 with SMTP id d7mr4998725wjt.73.1468917156256; Tue, 19 Jul 2016 01:32:36 -0700 (PDT) Received: from donizetti.lan (94-39-158-5.adsl-ull.clienti.tiscali.it. [94.39.158.5]) by smtp.gmail.com with ESMTPSA id w129sm20677087wmd.9.2016.07.19.01.32.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2016 01:32:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 19 Jul 2016 10:32:21 +0200 Message-Id: <1468917141-8155-11-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468917141-8155-1-git-send-email-pbonzini@redhat.com> References: <1468917141-8155-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH 10/10] 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: serge.fdrv@gmail.com, alex.bennee@linaro.org, sergey.fedorov@linaro.org 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 Message-Id: <20160715175852.30749-13-sergey.fedorov@linaro.org> Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée --- cpu-exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index f7f60b1..b240b9f 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -260,7 +260,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, tb = atomic_read(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(pc)]); if (unlikely(!tb || tb->pc != pc || tb->cs_base != cs_base || 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);