[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu v2 17/29] hwaddr: Make hwaddr type usable be
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu v2 17/29] hwaddr: Make hwaddr type usable beyond softmmu |
Date: |
Sun, 16 Jun 2013 17:57:37 +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 <address@hidden>
---
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 e061e21..e6f1c30 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -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"
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 <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
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
-#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
diff --git a/include/exec/memory.h b/include/exec/memory.h
index d53a6a1..d93d085 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -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"
--
1.8.1.4
- Re: [Qemu-devel] [PATCH qom-cpu v2 11/29] kvm: Change kvm_cpu_exec() argument to CPUState, (continued)
- [Qemu-devel] [PATCH qom-cpu v2 13/29] cpus: Change cpu_handle_guest_debug() argument to CPUState, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 12/29] gdbstub: Set gdb_set_stop_cpu() argument to CPUState, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 14/29] cpus: Change qemu_kvm_start_vcpu() argument to CPUState, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 15/29] cpus: Change qemu_dummy_start_vcpu() argument to CPUState, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 17/29] hwaddr: Make hwaddr type usable beyond softmmu,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-cpu v2 16/29] cpu: Change qemu_init_vcpu() argument to CPUState, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 09/29] cpu: Turn cpu_dump_{state, statistics}() into CPUState hooks, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 18/29] cpu: Turn cpu_unassigned_access() into a CPUState hook, Andreas Färber, 2013/06/16
- [Qemu-devel] [PATCH qom-cpu v2 20/29] kvm: Change kvm_remove_all_breakpoints() argument to CPUState, Andreas Färber, 2013/06/16