]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hwaddr: Make hwaddr type usable beyond softmmu
authorAndreas Färber <afaerber@suse.de>
Tue, 28 May 2013 12:02:38 +0000 (14:02 +0200)
committerAndreas Färber <afaerber@suse.de>
Fri, 28 Jun 2013 11:25:13 +0000 (13:25 +0200)
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ärber <afaerber@suse.de>
include/exec/cpu-common.h
include/exec/cpu-defs.h
include/exec/hwaddr.h
include/exec/memory.h

index 92a422313f99a67c184e354c6c24e21b271c176f..5240ae2ac2f5e52b3ce8bf8021e2a200acd0ef02 100644 (file)
@@ -3,7 +3,9 @@
 
 /* CPU interfaces that are target independent.  */
 
+#ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
+#endif
 
 #ifndef NEED_CPU_H
 #include "exec/poison.h"
index 2e5a9bab3c821c0b70e013413ad81d7584330214..c4ac929875132929250549872d8ae8df00bdea8f 100644 (file)
@@ -28,7 +28,9 @@
 #include <inttypes.h>
 #include "qemu/osdep.h"
 #include "qemu/queue.h"
+#ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
+#endif
 
 #ifndef TARGET_LONG_BITS
 #error TARGET_LONG_BITS must be defined before including this header
index 251cf9216f679863945299a4b413f967553a848a..c9eb78fba18f047cb0369be066fb5667b26f325b 100644 (file)
@@ -3,8 +3,6 @@
 #ifndef HWADDR_H
 #define HWADDR_H
 
-#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
 
 #endif
-
-#endif
index 3598c4f914340b8bc43625605a31505a0617957b..2ddc3c5393d302da5324d4f5b21830b14bb9f691 100644 (file)
@@ -20,7 +20,9 @@
 #include <stdbool.h>
 #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"