@@ -53,6 +53,10 @@ typedef uintptr_t ram_addr_t;
# define RAM_ADDR_FMT "%" PRIxPTR
#endif
+#ifndef CONFIG_USER_ONLY
+typedef ram_addr_t tb_page_addr_t;
+#endif
+
extern ram_addr_t ram_size;
ram_addr_t get_current_ram_size(void);
@@ -30,8 +30,6 @@
type. */
#if defined(CONFIG_USER_ONLY)
typedef abi_ulong tb_page_addr_t;
-#else
-typedef ram_addr_t tb_page_addr_t;
#endif
/* is_jmp field values */
@@ -24,6 +24,7 @@
#include <setjmp.h>
#include "hw/qdev-core.h"
#include "disas/bfd.h"
+#include "exec/cpu-common.h"
#include "exec/hwaddr.h"
#include "exec/memattrs.h"
#include "qemu/queue.h"
In system mode emulation (at least) this definition has no architecture specific dependencies. Move it to common code such that common code can use it (primarily for defining function prototypes). Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> --- So this is the same as in RFCv2 and the comment there was that it will not work for linux-user mode WRT to qom/cpu.h fn prototypes needed this def. But the solution there is intead conditionalise the def of those hooks on NEED_CPU_H. Then this patch is just needed for some misc. system-mode-only core code usages. --- include/exec/cpu-common.h | 4 ++++ include/exec/exec-all.h | 2 -- include/qom/cpu.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-)