From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmYm-0006rt-7b for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:26:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKmYg-0007Nr-7j for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:26:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmYf-0007Ne-Vw for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:26:46 -0500 Message-ID: <5315AA60.1020300@redhat.com> Date: Tue, 04 Mar 2014 11:26:40 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1393901250-3922-1-git-send-email-xbing6@gmail.com> <1393901250-3922-7-git-send-email-xbing6@gmail.com> In-Reply-To: <1393901250-3922-7-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 06/10] memory: move contents in include/exec/address-spaces.h => memory.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: > In preparation for removing include/exec/address-spaces.h Why? Paolo > Signed-off-by: Xuebing Wang > --- > include/exec/address-spaces.h | 29 ----------------------------- > include/exec/memory.h | 19 +++++++++++++++---- > include/hw/sh4/sh_intc.h | 1 + > 3 files changed, 16 insertions(+), 33 deletions(-) > > diff --git a/include/exec/address-spaces.h b/include/exec/address-spaces.h > index 3d12cdd..c6e5d51 100644 > --- a/include/exec/address-spaces.h > +++ b/include/exec/address-spaces.h > @@ -10,32 +10,3 @@ > * the COPYING file in the top-level directory. > * > */ > - > -#ifndef EXEC_MEMORY_H > -#define EXEC_MEMORY_H > - > -/* > - * Internal interfaces between memory.c/exec.c/vl.c. Do not #include unless > - * you're one of them. > - */ > - > -#include "exec/memory.h" > - > -#ifndef CONFIG_USER_ONLY > - > -/* Get the root memory region. This interface should only be used temporarily > - * until a proper bus interface is available. > - */ > -MemoryRegion *get_system_memory(void); > - > -/* Get the root I/O port region. This interface should only be used > - * temporarily until a proper bus interface is available. > - */ > -MemoryRegion *get_system_io(void); > - > -extern AddressSpace address_space_memory; > -extern AddressSpace address_space_io; > - > -#endif > - > -#endif > diff --git a/include/exec/memory.h b/include/exec/memory.h > index 9101fc3..bd75af9 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -25,9 +25,7 @@ > #include > #include "qemu-common.h" > #include "exec/cpu-common.h" > -#ifndef CONFIG_USER_ONLY > #include "exec/hwaddr.h" > -#endif > #include "qemu/queue.h" > #include "qemu/int128.h" > #include "qemu/notify.h" > @@ -1052,6 +1050,19 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, > int is_write, hwaddr access_len); > > > -#endif > +/* Get the root memory region. This interface should only be used temporarily > + * until a proper bus interface is available. > + */ > +MemoryRegion *get_system_memory(void); > + > +/* Get the root I/O port region. This interface should only be used > + * temporarily until a proper bus interface is available. > + */ > +MemoryRegion *get_system_io(void); > + > +extern AddressSpace address_space_memory; > +extern AddressSpace address_space_io; > + > +#endif /* !CONFIG_USER_ONLY */ > > -#endif > +#endif /* MEMORY_H */ > diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h > index b7ddcb0..644acb7 100644 > --- a/include/hw/sh4/sh_intc.h > +++ b/include/hw/sh4/sh_intc.h > @@ -4,6 +4,7 @@ > #include "qemu-common.h" > #include "hw/irq.h" > #include "exec/address-spaces.h" > +#include "exec/memory.h" > > typedef unsigned char intc_enum; > >