From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhycS-0004nn-ID for qemu-devel@nongnu.org; Thu, 08 Sep 2016 08:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhycR-0003Jp-DF for qemu-devel@nongnu.org; Thu, 08 Sep 2016 08:39:52 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:37514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhycR-0003Ja-5y for qemu-devel@nongnu.org; Thu, 08 Sep 2016 08:39:51 -0400 Received: by mail-wm0-x234.google.com with SMTP id w12so86627758wmf.0 for ; Thu, 08 Sep 2016 05:39:50 -0700 (PDT) References: <1468917141-8155-1-git-send-email-pbonzini@redhat.com> <1468917141-8155-11-git-send-email-pbonzini@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1468917141-8155-11-git-send-email-pbonzini@redhat.com> Date: Thu, 08 Sep 2016 13:39:48 +0100 Message-ID: <87y432y38r.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 10/10] tcg: rename tb_find_physical() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, serge.fdrv@gmail.com, sergey.fedorov@linaro.org Paolo Bonzini writes: > 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); -- Alex Bennée