From patchwork Wed Sep 7 15:20:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 113776 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 2EF78B6F83 for ; Thu, 8 Sep 2011 01:46:52 +1000 (EST) Received: from localhost ([::1]:49104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1JxK-0005HD-Mb for incoming@patchwork.ozlabs.org; Wed, 07 Sep 2011 11:22:26 -0400 Received: from eggs.gnu.org ([140.186.70.92]:40646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1JwJ-0002Np-Cd for qemu-devel@nongnu.org; Wed, 07 Sep 2011 11:21:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1JwA-00086c-6d for qemu-devel@nongnu.org; Wed, 07 Sep 2011 11:21:23 -0400 Received: from mail-yi0-f45.google.com ([209.85.218.45]:49610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Jw9-00086U-TZ for qemu-devel@nongnu.org; Wed, 07 Sep 2011 11:21:14 -0400 Received: by yib2 with SMTP id 2so542779yib.4 for ; Wed, 07 Sep 2011 08:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=32Fp7fiW8AV2XG16tdbeo6wNKEJpQDh34TErrDcgqLQ=; b=WpM7j9mxYa4CR8uRPxrUW6F91OIa+Q84ah7qU7V3PYk7OAkMO3fDU9diqloPm25zxL 5yKbzPngx7C5FN487gkR67Lb6ow+0kSkHrBq7JQnR2teJy2BteYO/IcE3vQMuAg04yG9 SSA3QuHzY5/HVAZRHH+b19tsWUGZVWxkiHzrU= Received: by 10.236.183.162 with SMTP id q22mr33359752yhm.81.1315408873516; Wed, 07 Sep 2011 08:21:13 -0700 (PDT) Received: from localhost.localdomain (93-34-199-31.ip51.fastwebnet.it [93.34.199.31]) by mx.google.com with ESMTPS id a12sm325187yhh.17.2011.09.07.08.21.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Sep 2011 08:21:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 7 Sep 2011 17:20:58 +0200 Message-Id: <1315408862-15178-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1315408862-15178-1-git-send-email-pbonzini@redhat.com> References: <1315408862-15178-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.218.45 Subject: [Qemu-devel] [PATCH 1/5] dma-helpers: rename is_write to to_dev 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 Signed-off-by: Paolo Bonzini --- dma-helpers.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index 4610ea0..ca97e14 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -42,7 +42,7 @@ typedef struct { BlockDriverAIOCB *acb; QEMUSGList *sg; uint64_t sector_num; - int is_write; + int to_dev; int sg_cur_index; target_phys_addr_t sg_cur_byte; QEMUIOVector iov; @@ -75,7 +75,7 @@ static void dma_bdrv_unmap(DMAAIOCB *dbs) for (i = 0; i < dbs->iov.niov; ++i) { cpu_physical_memory_unmap(dbs->iov.iov[i].iov_base, - dbs->iov.iov[i].iov_len, !dbs->is_write, + dbs->iov.iov[i].iov_len, !dbs->to_dev, dbs->iov.iov[i].iov_len); } } @@ -101,7 +101,7 @@ static void dma_bdrv_cb(void *opaque, int ret) while (dbs->sg_cur_index < dbs->sg->nsg) { cur_addr = dbs->sg->sg[dbs->sg_cur_index].base + dbs->sg_cur_byte; cur_len = dbs->sg->sg[dbs->sg_cur_index].len - dbs->sg_cur_byte; - mem = cpu_physical_memory_map(cur_addr, &cur_len, !dbs->is_write); + mem = cpu_physical_memory_map(cur_addr, &cur_len, !dbs->to_dev); if (!mem) break; qemu_iovec_add(&dbs->iov, mem, cur_len); @@ -143,7 +143,7 @@ static AIOPool dma_aio_pool = { BlockDriverAIOCB *dma_bdrv_io( BlockDriverState *bs, QEMUSGList *sg, uint64_t sector_num, DMAIOFunc *io_func, BlockDriverCompletionFunc *cb, - void *opaque, int is_write) + void *opaque, int to_dev) { DMAAIOCB *dbs = qemu_aio_get(&dma_aio_pool, bs, cb, opaque); @@ -153,7 +153,7 @@ BlockDriverAIOCB *dma_bdrv_io( dbs->sector_num = sector_num; dbs->sg_cur_index = 0; dbs->sg_cur_byte = 0; - dbs->is_write = is_write; + dbs->to_dev = to_dev; dbs->io_func = io_func; dbs->bh = NULL; qemu_iovec_init(&dbs->iov, sg->nsg);