From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YywU8-0001gS-Co for qemu-devel@nongnu.org; Sun, 31 May 2015 02:12:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YywU5-0000Ws-EF for qemu-devel@nongnu.org; Sun, 31 May 2015 02:12:36 -0400 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]:36721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YywU5-0000Wo-79 for qemu-devel@nongnu.org; Sun, 31 May 2015 02:12:33 -0400 Received: by pdjm12 with SMTP id m12so1203920pdj.3 for ; Sat, 30 May 2015 23:12:32 -0700 (PDT) From: Peter Crosthwaite Date: Sat, 30 May 2015 23:11:39 -0700 Message-Id: <4b6acf1900df20165fa4c269f071248e4d5f8fec.1433052532.git.crosthwaite.peter@gmail.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyone List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Peter Crosthwaite , pbonzini@redhat.com, edgar.iglesias@gmail.com, afaerber@suse.de, rth@twiddle.net 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 --- 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 #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