From patchwork Tue Mar 15 15:03:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 8589891 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3611D9F294 for ; Tue, 15 Mar 2016 15:39:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 710652024C for ; Tue, 15 Mar 2016 15:39:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7EB72022D for ; Tue, 15 Mar 2016 15:39:31 +0000 (UTC) Received: from localhost ([::1]:49275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afr4F-0002Gf-3c for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Mar 2016 11:39:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afqVm-0004MS-CU for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:03:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afqVj-0007eP-C2 for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:03:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afqVj-0007e5-7W for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:03:51 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id D79C1804E4; Tue, 15 Mar 2016 15:03:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2FF3nE7025428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 15 Mar 2016 11:03:50 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E19643011FB7; Tue, 15 Mar 2016 16:03:41 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 15 Mar 2016 16:03:38 +0100 Message-Id: <1458054221-16923-13-git-send-email-armbru@redhat.com> In-Reply-To: <1458054221-16923-1-git-send-email-armbru@redhat.com> References: <1458054221-16923-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH 12/15] isa: Move DMA_transfer_handler from qemu-common.h to hw/isa/isa.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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DMA_transfer_handler is actually an ISA thing, and as such has no business in qemu-common.h. Move it to hw/isa/isa.h, and rename it to IsaDmaTransferHandler. Signed-off-by: Markus Armbruster --- hw/dma/i8257.c | 2 +- include/hw/isa/i8257.h | 2 +- include/hw/isa/isa.h | 5 ++++- include/qemu-common.h | 2 -- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 6078893..f345c54 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -381,7 +381,7 @@ out: } static void i8257_dma_register_channel(IsaDma *obj, int nchan, - DMA_transfer_handler transfer_handler, + IsaDmaTransferHandler transfer_handler, void *opaque) { I8257State *d = I8257(obj); diff --git a/include/hw/isa/i8257.h b/include/hw/isa/i8257.h index 8d34ed1..8c44d36 100644 --- a/include/hw/isa/i8257.h +++ b/include/hw/isa/i8257.h @@ -11,7 +11,7 @@ typedef struct I8257Regs { uint8_t pageh; uint8_t dack; uint8_t eop; - DMA_transfer_handler transfer_handler; + IsaDmaTransferHandler transfer_handler; void *opaque; } I8257Regs; diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 0bbe21c..ffb2ea7 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -54,6 +54,9 @@ typedef enum { ISADMA_TRANSFER_ILLEGAL, } IsaDmaTransferMode; +typedef int (*IsaDmaTransferHandler)(void *opaque, int nchan, int pos, + int size); + typedef struct IsaDmaClass { InterfaceClass parent; @@ -65,7 +68,7 @@ typedef struct IsaDmaClass { void (*release_DREQ)(IsaDma *obj, int nchan); void (*schedule)(IsaDma *obj); void (*register_channel)(IsaDma *obj, int nchan, - DMA_transfer_handler transfer_handler, + IsaDmaTransferHandler transfer_handler, void *opaque); } IsaDmaClass; diff --git a/include/qemu-common.h b/include/qemu-common.h index e7bd1f8..bbb45b2 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -294,8 +294,6 @@ int qemu_openpty_raw(int *aslave, char *pty_name); sendto(sockfd, buf, len, flags, destaddr, addrlen) #endif -typedef int (*DMA_transfer_handler) (void *opaque, int nchan, int pos, int size); - void tcg_exec_init(unsigned long tb_size); bool tcg_enabled(void);