Commit ce927ed9 authored by Andreas Färber's avatar Andreas Färber
Browse files

hwaddr: Make hwaddr type usable beyond softmmu



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: default avatarAndreas Färber <afaerber@suse.de>
parent c643bed9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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"
+2 −0
Original line number Diff line number Diff line
@@ -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
+0 −4
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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"