From patchwork Mon May 6 14:26:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 241699 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 518B72C00FE for ; Tue, 7 May 2013 01:05:51 +1000 (EST) Received: from localhost ([::1]:33919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMSV-0003Ps-Tf for incoming@patchwork.ozlabs.org; Mon, 06 May 2013 10:32:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMNe-0006Ia-N8 for qemu-devel@nongnu.org; Mon, 06 May 2013 10:27:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZMNc-0005ne-LF for qemu-devel@nongnu.org; Mon, 06 May 2013 10:27:06 -0400 Received: from david.siemens.de ([192.35.17.14]:16124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMNc-0005n3-6R for qemu-devel@nongnu.org; Mon, 06 May 2013 10:27:04 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.13.6/8.13.6) with ESMTP id r46EQLDN005847; Mon, 6 May 2013 16:26:21 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id r46EQJBU011305; Mon, 6 May 2013 16:26:21 +0200 From: Jan Kiszka To: qemu-devel Date: Mon, 6 May 2013 16:26:18 +0200 Message-Id: <7c31ee55bd58c13a4e7a8d2de2fbd1af4ce250a8.1367849167.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 192.35.17.14 Cc: Paolo Bonzini , Liu Ping Fan , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [RFC][PATCH 15/15] ioport: Move IOPortRead/WriteFunc typedefs to memory.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 Move the function types required for MemoryRegionPortio to memory.h. This allows to let ioport.h depend on memory.h, which is more consistent instead than the other way around. Signed-off-by: Jan Kiszka --- include/exec/ioport.h | 8 +------- include/exec/memory.h | 4 +++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/exec/ioport.h b/include/exec/ioport.h index ba3ebb8..c7da6d4 100644 --- a/include/exec/ioport.h +++ b/include/exec/ioport.h @@ -25,6 +25,7 @@ #define IOPORT_H #include "qemu-common.h" +#include "exec/memory.h" typedef uint32_t pio_addr_t; #define FMT_pioaddr PRIx32 @@ -32,10 +33,6 @@ typedef uint32_t pio_addr_t; #define MAX_IOPORTS (64 * 1024) #define IOPORTS_MASK (MAX_IOPORTS - 1) -/* These should really be in isa.h, but are here to make pc.h happy. */ -typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); -typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); - void cpu_outb(pio_addr_t addr, uint8_t val); void cpu_outw(pio_addr_t addr, uint16_t val); void cpu_outl(pio_addr_t addr, uint32_t val); @@ -43,9 +40,6 @@ uint8_t cpu_inb(pio_addr_t addr); uint16_t cpu_inw(pio_addr_t addr); uint32_t cpu_inl(pio_addr_t addr); -struct MemoryRegion; -struct MemoryRegionPortio; - typedef struct PortioList { const struct MemoryRegionPortio *ports; struct MemoryRegion *address_space; diff --git a/include/exec/memory.h b/include/exec/memory.h index cad73f5..7843076 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -22,7 +22,6 @@ #include "exec/cpu-common.h" #include "exec/hwaddr.h" #include "qemu/queue.h" -#include "exec/ioport.h" #include "qemu/int128.h" typedef struct MemoryRegionOps MemoryRegionOps; @@ -136,6 +135,9 @@ struct MemoryRegion { MemoryRegionIoeventfd *ioeventfds; }; +typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); +typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); + struct MemoryRegionPortio { uint32_t offset; uint32_t len;