From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Usb6G-0006d3-Gv for qemu-devel@nongnu.org; Fri, 28 Jun 2013 12:00:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Usb1p-0003kU-27 for qemu-devel@nongnu.org; Fri, 28 Jun 2013 11:56:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44182 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Usb1o-0003jX-MC for qemu-devel@nongnu.org; Fri, 28 Jun 2013 11:56:04 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 18D5FA5511 for ; Fri, 28 Jun 2013 17:56:04 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 28 Jun 2013 17:55:45 +0200 Message-Id: <1372434946-18489-24-git-send-email-afaerber@suse.de> In-Reply-To: <1372434946-18489-1-git-send-email-afaerber@suse.de> References: <1372434946-18489-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 23/24] hwaddr: Make hwaddr type usable beyond softmmu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= While not normally needed for *-user, it can safely be used there since always based on uint64_t, to avoid ifdeffery. To avoid accidental uses, move the guards from exec/hwaddr.h to its inclusion sites. No need for them in include/hw/. Prepares for hwaddr use in qom/cpu.h. Signed-off-by: Andreas F=C3=A4rber --- include/exec/cpu-common.h | 2 ++ include/exec/cpu-defs.h | 2 ++ include/exec/hwaddr.h | 4 ---- include/exec/memory.h | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 92a4223..5240ae2 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -3,7 +3,9 @@ =20 /* CPU interfaces that are target independent. */ =20 +#ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" +#endif =20 #ifndef NEED_CPU_H #include "exec/poison.h" diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 2e5a9ba..c4ac929 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -28,7 +28,9 @@ #include #include "qemu/osdep.h" #include "qemu/queue.h" +#ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" +#endif =20 #ifndef TARGET_LONG_BITS #error TARGET_LONG_BITS must be defined before including this header diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 251cf92..c9eb78f 100644 --- a/include/exec/hwaddr.h +++ b/include/exec/hwaddr.h @@ -3,8 +3,6 @@ #ifndef HWADDR_H #define HWADDR_H =20 -#ifndef CONFIG_USER_ONLY - #define HWADDR_BITS 64 /* hwaddr is the type of a physical address (its size can be different from 'target_ulong'). */ @@ -20,5 +18,3 @@ typedef uint64_t hwaddr; #define HWADDR_PRIX PRIX64 =20 #endif - -#endif diff --git a/include/exec/memory.h b/include/exec/memory.h index 3598c4f..2ddc3c5 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -20,7 +20,9 @@ #include #include "qemu-common.h" #include "exec/cpu-common.h" +#ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" +#endif #include "qemu/queue.h" #include "exec/iorange.h" #include "exec/ioport.h" --=20 1.8.1.4