From patchwork Thu Jun 2 15:12:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 98435 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 17B96B6FC7 for ; Fri, 3 Jun 2011 01:55:05 +1000 (EST) Received: from localhost ([::1]:47965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSAEg-0006M1-0l for incoming@patchwork.ozlabs.org; Thu, 02 Jun 2011 11:55:02 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS9aB-0004X1-NT for qemu-devel@nongnu.org; Thu, 02 Jun 2011 11:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QS9a1-0005Jm-O1 for qemu-devel@nongnu.org; Thu, 02 Jun 2011 11:13:11 -0400 Received: from ozlabs.org ([203.10.76.45]:35351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS9a1-0005Ix-1a for qemu-devel@nongnu.org; Thu, 02 Jun 2011 11:13:01 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id B43D6B6FA9; Fri, 3 Jun 2011 01:12:55 +1000 (EST) From: David Gibson To: qemu-devel@nongnu.org, eduard.munteanu@linux360.ro, rth@twiddle.net Date: Fri, 3 Jun 2011 01:12:36 +1000 Message-Id: <1307027562-3460-9-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1307027562-3460-1-git-send-email-david@gibson.dropbear.id.au> References: <1307027562-3460-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 203.10.76.45 Subject: [Qemu-devel] [PATCH 08/14] es1370: use the DMA memory access interface 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 allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu --- hw/es1370.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index 40cb48c..8880746 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -802,7 +802,7 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel, if (!acquired) break; - cpu_physical_memory_write (addr, tmpbuf, acquired); + dma_memory_write (&s->dev.qdev, addr, tmpbuf, acquired); temp -= acquired; addr += acquired; @@ -816,7 +816,7 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel, int copied, to_copy; to_copy = audio_MIN ((size_t) temp, sizeof (tmpbuf)); - cpu_physical_memory_read (addr, tmpbuf, to_copy); + dma_memory_read (&s->dev.qdev, addr, tmpbuf, to_copy); copied = AUD_write (voice, tmpbuf, to_copy); if (!copied) break;