From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzKaG-0007Ok-ED for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:56:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzKaB-0000JN-Eg for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:56:32 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:33255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzKaB-0000JJ-84 for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:56:27 -0400 Received: by wicmx19 with SMTP id mx19so62691427wic.0 for ; Mon, 01 Jun 2015 00:56:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <556C1021.6030301@redhat.com> Date: Mon, 01 Jun 2015 09:56:17 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <26fe619f01abfe3bedd64733c0500b84675f3f44.1433052532.git.crosthwaite.peter@gmail.com> In-Reply-To: <26fe619f01abfe3bedd64733c0500b84675f3f44.1433052532.git.crosthwaite.peter@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 11/34] include/exec: Move cputlb exec.c defs out List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net, edgar.iglesias@gmail.com, afaerber@suse.de, Peter Crosthwaite On 31/05/2015 08:11, Peter Crosthwaite wrote: > Move the architecture agnostic function prototypes for exec.c out of > cputlb.h to exec-all.h. This allows hiding of the arch specific > cputlb.h from exec.c which should be getting close to having no > architecture specifics. Prepares support for multi-arch, which will have > a minimal cpu.h that services exec.c but not cputlb.h. > > Signed-off-by: Peter Crosthwaite Since you are at it, tlb_protect_code/tlb_unprotect_code can also be moved to this new header (and to translate-common.c). Paolo > --- > exec.c | 1 - > include/exec/cputlb.h | 14 -------------- > include/exec/exec-all.h | 15 +++++++++++++++ > 3 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/exec.c b/exec.c > index 0cb54f7..71ec173 100644 > --- a/exec.c > +++ b/exec.c > @@ -48,7 +48,6 @@ > #endif > #include "exec/cpu-all.h" > #include "qemu/rcu_queue.h" > -#include "exec/cputlb.h" > #include "translate-all.h" > > #include "exec/memory-internal.h" > diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h > index e0da9d7..9167ff6 100644 > --- a/include/exec/cputlb.h > +++ b/include/exec/cputlb.h > @@ -30,19 +30,5 @@ void cpu_tlb_reset_dirty_all(ram_addr_t start1, ram_addr_t length); > void tlb_set_dirty(CPUArchState *env, target_ulong vaddr); > extern int tlb_flush_count; > > -/* exec.c */ > -void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr); > - > -MemoryRegionSection * > -address_space_translate_for_iotlb(CPUState *cpu, hwaddr addr, hwaddr *xlat, > - hwaddr *plen); > -hwaddr memory_region_section_get_iotlb(CPUState *cpu, > - MemoryRegionSection *section, > - target_ulong vaddr, > - hwaddr paddr, hwaddr xlat, > - int prot, > - target_ulong *address); > -bool memory_region_is_unassigned(MemoryRegion *mr); > - > #endif > #endif > diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h > index 12630ea..d52885e 100644 > --- a/include/exec/exec-all.h > +++ b/include/exec/exec-all.h > @@ -356,6 +356,21 @@ static inline tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong > #else > /* cputlb.c */ > tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr); > + > +/* exec.c */ > +void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr); > + > +MemoryRegionSection * > +address_space_translate_for_iotlb(CPUState *cpu, hwaddr addr, hwaddr *xlat, > + hwaddr *plen); > +hwaddr memory_region_section_get_iotlb(CPUState *cpu, > + MemoryRegionSection *section, > + target_ulong vaddr, > + hwaddr paddr, hwaddr xlat, > + int prot, > + target_ulong *address); > +bool memory_region_is_unassigned(MemoryRegion *mr); > + > #endif > > /* vl.c */ >