[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyo
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyone |
Date: |
Sat, 30 May 2015 23:11:39 -0700 |
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 <address@hidden>
---
include/exec/cpu-common.h | 4 ++++
include/exec/exec-all.h | 2 --
include/qom/cpu.h | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 43428bd..ad27ad7 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -51,6 +51,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);
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 078f517..680d8bc 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -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 */
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 363c928..4508c56 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -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"
--
1.9.1
- [Qemu-devel] [RFC v2 00/34] Multi Architecture System Emulation, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 01/34] cpu-defs: Move CPU_TEMP_BUF_NLONGS to tcg, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 02/34] cpu-exec: Purge all uses of CPU_GET_ENV, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 03/34] Makefile.target: Introduce arch-obj, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 04/34] cpu-exec: Migrate some generic fns to cpus.c, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 05/34] translate: Listify tcg_exec_init, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyone,
Peter Crosthwaite <=
- [Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 08/34] translate-all: Move tcg_handle_interrupt to -common, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 09/34] include/exec: Move standard exceptions to cpu-all.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 10/34] include/exec: Split target_long def to new header, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 11/34] include/exec: Move cputlb exec.c defs out, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 12/34] include/exec: Move tb hash functions out, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 13/34] cpu-defs: Move out TB_JMP defines, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 14/34] cpu-defs: Allow multiple inclusions, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 15/34] HACK: monitor: Comment out TCG profile ops, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 16/34] HACK: Disable list_cpus, Peter Crosthwaite, 2015/05/31