Signed-off-by: Xuebing Wang <address@hidden>
---
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 <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 "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;