From patchwork Tue Oct 22 21:08:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 3084721 X-Patchwork-Delegate: dan.j.williams@gmail.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D07ED9F372 for ; Tue, 22 Oct 2013 21:08:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CBB3F2046F for ; Tue, 22 Oct 2013 21:08:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 830982046B for ; Tue, 22 Oct 2013 21:08:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754357Ab3JVVIH (ORCPT ); Tue, 22 Oct 2013 17:08:07 -0400 Received: from mga02.intel.com ([134.134.136.20]:8001 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753406Ab3JVVIF (ORCPT ); Tue, 22 Oct 2013 17:08:05 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 22 Oct 2013 14:08:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,550,1378882800"; d="scan'208";a="415395723" Received: from viggo.jf.intel.com ([10.23.232.61]) by fmsmga001.fm.intel.com with ESMTP; 22 Oct 2013 14:08:02 -0700 Subject: [PATCH v2 01/13] dmatest: make driver unmap also source buffers by itself From: Dan Williams To: dmaengine@vger.kernel.org Cc: dave.jiang@intel.com, b.zolnierkie@samsung.com, vinod.koul@intel.com, t.figa@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, linux@arm.linux.org.uk, andriy.shevchenko@linux.intel.com Date: Tue, 22 Oct 2013 14:08:01 -0700 Message-ID: <20131022210801.31111.58095.stgit@viggo.jf.intel.com> In-Reply-To: <1382117733-16720-2-git-send-email-b.zolnierkie@samsung.com> References: <1382117733-16720-2-git-send-email-b.zolnierkie@samsung.com> User-Agent: StGit/0.17-1-g7c57 MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 From: Bartlomiej Zolnierkiewicz Make the driver DMA unmap also source buffers by itself (currently it DMA unmaps only destination buffers) as a preparation for introducing generic 'ummap' data. Cc: Dan Williams Cc: Vinod Koul Cc: Tomasz Figa Cc: Dave Jiang Cc: Andy Shevchenko Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kyungmin Park Acked-by: Andy Shevchenko --- Resend to: 1/ add it to the new dmaengine patchwork 2/ cc maintainers of affected drivers 3/ fixup some mail addresses drivers/dma/dmatest.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 92f796cdc6ab..f4a2a25fae31 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -597,11 +597,10 @@ static int dmatest_func(void *data) set_user_nice(current, 10); /* - * src buffers are freed by the DMAEngine code with dma_unmap_single() - * dst buffers are freed by ourselves below + * src and dst buffers are freed by ourselves below */ - flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT - | DMA_COMPL_SKIP_DEST_UNMAP | DMA_COMPL_SRC_UNMAP_SINGLE; + flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT | + DMA_COMPL_SKIP_SRC_UNMAP | DMA_COMPL_SKIP_DEST_UNMAP; while (!kthread_should_stop() && !(params->iterations && total_tests >= params->iterations)) { @@ -750,7 +749,8 @@ static int dmatest_func(void *data) continue; } - /* Unmap by myself (see DMA_COMPL_SKIP_DEST_UNMAP above) */ + /* Unmap by myself */ + unmap_src(dev->dev, dma_srcs, len, src_cnt); unmap_dst(dev->dev, dma_dsts, params->buf_size, dst_cnt); error_count = 0;