From patchwork Fri Jan 18 07:46:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 1999891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 86B87DF280 for ; Fri, 18 Jan 2013 07:48:54 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tw6ek-0005D9-Q0; Fri, 18 Jan 2013 07:46:30 +0000 Received: from norkia.v3.sk ([91.210.183.14]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tw6eh-0005Cm-Rt for linux-arm-kernel@lists.infradead.org; Fri, 18 Jan 2013 07:46:28 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by norkia.v3.sk (Postfix) with ESMTP id C37A112A0E8; Fri, 18 Jan 2013 08:46:26 +0100 (CET) X-Virus-Scanned: amavisd-new at v3.sk Received: from norkia.v3.sk ([127.0.0.1]) by localhost (norkia.v3.sk [127.0.0.1]) (amavisd-new, port 10024) with SMTP id lxgrp0jxfLt3; Fri, 18 Jan 2013 08:46:24 +0100 (CET) Received: from localhost.localdomain (ip-94-113-108-27.net.upcbroadband.cz [94.113.108.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lkundrak@v3.sk) by norkia.v3.sk (Postfix) with ESMTP id 0F4F512A0E7; Fri, 18 Jan 2013 08:46:24 +0100 (CET) From: Lubomir Rintel To: Thomas Petazzoni Subject: [PATCH 1/3] dma: mv_xor: do not sync the DMA buffer after being deallocated Date: Fri, 18 Jan 2013 08:46:20 +0100 Message-Id: <1358495182-30964-1-git-send-email-lkundrak@v3.sk> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1358495154.28503.5.camel@unicorn> References: <1358495154.28503.5.camel@unicorn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130118_024628_032485_956E320D X-CRM114-Status: GOOD ( 11.44 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Vinod Koul , Lubomir Rintel , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dan Williams X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DMA_CHECK was unhappy: mv_xor mv_xor.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x000000001f3a1a40] [size=2000 bytes] Deallocation, which involves a sync, happens automatically by mv_xor_slot_cleanup() once the transfer is finished. Signed-off-by: Lubomir Rintel --- drivers/dma/mv_xor.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index e666983..8b81a04 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -960,8 +960,6 @@ static int mv_xor_memcpy_self_test(struct mv_xor_chan *mv_chan) goto free_resources; } - dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, - MV_XOR_TEST_SIZE, DMA_FROM_DEVICE); if (memcmp(src, dest, MV_XOR_TEST_SIZE)) { dev_err(dma_chan->device->dev, "Self-test copy failed compare, disabling\n"); @@ -1054,8 +1052,6 @@ mv_xor_xor_self_test(struct mv_xor_chan *mv_chan) goto free_resources; } - dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, - PAGE_SIZE, DMA_FROM_DEVICE); for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) { u32 *ptr = page_address(dest); if (ptr[i] != cmp_word) {