[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 14/35] cpu-common: Define tb_page_addr_t for ever
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH v3 14/35] cpu-common: Define tb_page_addr_t for everyone |
Date: |
Sat, 18 Jul 2015 02:40:24 -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>
---
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(-)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 9fb1d54..47d416d 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -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);
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index cc19fc3..8fd0540 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 0815ed5..eb12d26 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] [PATCH v3 04/35] tcg: split tcg_op_defs to -common, (continued)
- [Qemu-devel] [PATCH v3 04/35] tcg: split tcg_op_defs to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 05/35] tcg: Move tcg_tb_ptr to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 06/35] translate: move real_host_page setting to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 07/35] cpus: Listify cpu_list() function, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 08/35] translate-common: Listify tcg_enabled(), Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 09/35] core: Convert tcg_enabled() users to tcg_(any|all)_enabled(), Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 10/35] exec-all: Move cpu_can_do_io() to qom/cpu.h, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 11/35] cputlb: move CPU_LOOP() for tlb_reset() to exec.c, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 12/35] cputlb: Change tlb_set_dirty() arg to cpu, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 13/35] include/exec: Move cputlb exec.c defs out, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 14/35] cpu-common: Define tb_page_addr_t for everyone,
Peter Crosthwaite <=
- [Qemu-devel] [PATCH v3 15/35] include/exec: Split target_long def to new header, Peter Crosthwaite, 2015/07/18
[Qemu-devel] [PATCH v3 17/35] monitor: uninclude cpu_ldst, Peter Crosthwaite, 2015/07/18
[Qemu-devel] [PATCH v3 16/35] cpu-defs: Allow multiple inclusions, Peter Crosthwaite, 2015/07/18
[Qemu-devel] [PATCH v3 19/35] target-*: cpu.h: Undefine core code symbols, Peter Crosthwaite, 2015/07/18
[Qemu-devel] [PATCH v3 18/35] target-*: Don't redefine cpu_exec(), Peter Crosthwaite, 2015/07/18
[Qemu-devel] [PATCH v3 20/35] Makefile.target: Introduce arch-obj, Peter Crosthwaite, 2015/07/18