From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmcI-00011G-Cc for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:30:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKmcD-0000KO-Fi for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:30:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmcD-0000K7-8Z for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:30:25 -0500 Message-ID: <5315AB22.1050506@redhat.com> Date: Tue, 04 Mar 2014 11:29:54 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1393901250-3922-1-git-send-email-xbing6@gmail.com> <1393901250-3922-11-git-send-email-xbing6@gmail.com> In-Reply-To: <1393901250-3922-11-git-send-email-xbing6@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Discussion 10/10] translate: remove file translate-all.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xuebing Wang , qemu-devel@nongnu.org Cc: afaerber@suse.de, stefanha@redhat.com Il 04/03/2014 03:47, Xuebing Wang ha scritto: > This patch does below: > - Move the declaration of 2 translate functions from translate-all.h into > include/exec/translate.h > - remove file translate-all.h No, this is backwards. :) translate-all.h is a private interface between exec.c and translate-all.c. What you really want is to remove the inclusion of exec/translate.h from exec/exec-all.h. And possibly also the inclusion of exec/exec-all.h from */cpu.h. Both of these are quite complex, however. Paolo > Signed-off-by: Xuebing Wang > --- > exec.c | 2 -- > include/exec/translate.h | 4 ++++ > translate-all.c | 2 +- > translate-all.h | 27 --------------------------- > 4 files changed, 5 insertions(+), 30 deletions(-) > delete mode 100644 translate-all.h > > diff --git a/exec.c b/exec.c > index ffbd26c..ee52b3b 100644 > --- a/exec.c > +++ b/exec.c > @@ -44,8 +44,6 @@ > #endif > > #include "exec/cputlb.h" > -#include "translate-all.h" > - > #include "exec/memory-internal.h" > #include "exec/ram_addr.h" > #include "qemu/cache-utils.h" > diff --git a/include/exec/translate.h b/include/exec/translate.h > index 9e877f2..42895b4 100644 > --- a/include/exec/translate.h > +++ b/include/exec/translate.h > @@ -303,4 +303,8 @@ extern uintptr_t tci_tb_ptr; > > #define GETPC() (GETRA() - GETPC_ADJ) > > +/* translate-all.c */ > +void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len); > +void tb_check_watchpoint(CPUArchState *env); > + > #endif /* EXEC_TRANSLATE_H */ > diff --git a/translate-all.c b/translate-all.c > index 98e215f..975f823 100644 > --- a/translate-all.c > +++ b/translate-all.c > @@ -61,7 +61,7 @@ > #endif > > #include "exec/cputlb.h" > -#include "translate-all.h" > +#include "exec/translate.h" > #include "qemu/timer.h" > > //#define DEBUG_TB_INVALIDATE > diff --git a/translate-all.h b/translate-all.h > deleted file mode 100644 > index f7e5932..0000000 > --- a/translate-all.h > +++ /dev/null > @@ -1,27 +0,0 @@ > -/* > - * Translated block handling > - * > - * Copyright (c) 2003 Fabrice Bellard > - * > - * This library is free software; you can redistribute it and/or > - * modify it under the terms of the GNU Lesser General Public > - * License as published by the Free Software Foundation; either > - * version 2 of the License, or (at your option) any later version. > - * > - * This library is distributed in the hope that it will be useful, > - * but WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * Lesser General Public License for more details. > - * > - * You should have received a copy of the GNU Lesser General Public > - * License along with this library; if not, see . > - */ > -#ifndef TRANSLATE_ALL_H > -#define TRANSLATE_ALL_H > - > -/* translate-all.c */ > -void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len); > -void cpu_unlink_tb(CPUState *cpu); > -void tb_check_watchpoint(CPUArchState *env); > - > -#endif /* TRANSLATE_ALL_H */ >