From patchwork Thu May 30 15:07:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 247631 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 198F22C009F for ; Fri, 31 May 2013 01:15:21 +1000 (EST) Received: from localhost ([::1]:38119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui4Ue-0004Na-U2 for incoming@patchwork.ozlabs.org; Thu, 30 May 2013 11:10:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui4Sh-0000xt-3c for qemu-devel@nongnu.org; Thu, 30 May 2013 11:08:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui4SZ-0000YW-Rv for qemu-devel@nongnu.org; Thu, 30 May 2013 11:08:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44012 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui4SZ-0000YI-LF for qemu-devel@nongnu.org; Thu, 30 May 2013 11:08:11 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 48960A5359; Thu, 30 May 2013 17:08:11 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2013 17:07:57 +0200 Message-Id: <1369926481-20720-6-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1369926481-20720-1-git-send-email-afaerber@suse.de> References: <1369926481-20720-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: pbonzini@redhat.com, qiaonuohan@cn.fujitsu.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= , lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH qom-cpu v3 5/9] memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This will avoid issues with hwaddr and ram_addr_t when including sysemu/memory_mapping.h for CONFIG_USER_ONLY. Signed-off-by: Andreas Färber --- include/qemu/typedefs.h | 2 ++ include/sysemu/memory_mapping.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 93aae81..1218a61 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -22,6 +22,8 @@ typedef struct AddressSpace AddressSpace; typedef struct MemoryRegion MemoryRegion; typedef struct MemoryRegionSection MemoryRegionSection; +typedef struct MemoryMappingList MemoryMappingList; + typedef struct NICInfo NICInfo; typedef struct HCIInfo HCIInfo; typedef struct AudioState AudioState; diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h index 6f01524..1f71c32 100644 --- a/include/sysemu/memory_mapping.h +++ b/include/sysemu/memory_mapping.h @@ -15,6 +15,7 @@ #define MEMORY_MAPPING_H #include "qemu/queue.h" +#include "qemu/typedefs.h" /* The physical and virtual address in the memory mapping are contiguous. */ typedef struct MemoryMapping { @@ -24,11 +25,11 @@ typedef struct MemoryMapping { QTAILQ_ENTRY(MemoryMapping) next; } MemoryMapping; -typedef struct MemoryMappingList { +struct MemoryMappingList { unsigned int num; MemoryMapping *last_mapping; QTAILQ_HEAD(, MemoryMapping) head; -} MemoryMappingList; +}; int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env);