Received: by 10.192.165.148 with SMTP id m20csp4057663imm; Tue, 8 May 2018 02:05:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZosu2hyV9AVNILNCqF5+BqbwkK0tbxyFmgxSbCjU326HuiNKoXCQRnIWyYKq1KzXjKfRqFn X-Received: by 2002:a65:5247:: with SMTP id q7-v6mr31587369pgp.27.1525770305168; Tue, 08 May 2018 02:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525770305; cv=none; d=google.com; s=arc-20160816; b=X27zOFV4SNy0VFsKCSAGxtaGHrwR2ufZA/KRHMYQz7e/qZeomxv9SJactOaG1ZGBl5 SUtmJqXUTjPTOtEqysglsYMQHXr7DL/H/PmEypNLK159oLvtdgiMQ3c8TxaSj4NKjG+H R4hYV9Ep2j9O15SYNTLBO39Fj2D/L8iShAmql74yZOYbrSFvW8x9ufoTYZEqGzFMEZsQ iz5riZn5GA8FiMKywk79zL5YCPRDZvJu0TabpMDCirRy77c/BR0DXNhYzzZsufFmGI/f tbW1H4bGHn90oFjJ5DOvIE6wY5c+Aw7p05WmnigVTEbkYEewVCp6g8iP5hdrs/1Z+4SL Pk8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter :arc-authentication-results; bh=pkVTAVgOgksJDYDeGozVv4SS0zb6qkZqK/M2MTibtuQ=; b=KeXHcEpNx8NDXCDYQRUwLemykgLSUkF/Oc+pFgb9cFLddjHBRA6CIXmh32n6PG7CK5 1SfaVuRjk+6sZBcgR6Iy2m8bUSdZueKfy/O5dYGA4O8JDHC5RosG+TmlD3yQKk9tb22A RzY6mYZUagKt2QVSWJiB3NtxSUNrk5wHaGFtB2q3yR/PfI09NRV6EpMzGZNICEinhoCa L3YQGzWgUlLYt9GgXAWctwysXtuKSnRW7WH8x2nQFB9HjirwcQm5pVLCxVBKwDA54W/Y mGTP5iL5wExwR11WtiViW125D07NJGDHuGvHSkNXHX1vhqmDxXvfFiBIJrF0h6W1R04c ZDTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WGRtH+hg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si14213884pfm.110.2018.05.08.02.04.50; Tue, 08 May 2018 02:05:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WGRtH+hg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754832AbeEHJEP (ORCPT + 99 others); Tue, 8 May 2018 05:04:15 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55158 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754210AbeEHJEM (ORCPT ); Tue, 8 May 2018 05:04:12 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180508090410euoutp01a4a40f724bbb559e10ba768efca60a0d~sn-Vqbh6y0857908579euoutp01k for ; Tue, 8 May 2018 09:04:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180508090410euoutp01a4a40f724bbb559e10ba768efca60a0d~sn-Vqbh6y0857908579euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1525770250; bh=pkVTAVgOgksJDYDeGozVv4SS0zb6qkZqK/M2MTibtuQ=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=WGRtH+hgQUrmUSfsxR78AvZ/KONsRykP6yNVwFL/vN5j6zuZFHREziEnuzuE/zlOA Tgh0Z5QB9PxZtC+HsrkuCrgU7/mBeW9mWUiqygMdM5vgTkB/uoasZFzDQtHdRoWCYK Reb0tyRQ5bOiEOh9dN5M7LwwHPgEwnWWuf1I1JxM= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180508090408eucas1p2935b9f3cec18c08866f1854a72b4f35c~sn-UVcXM71345913459eucas1p2b; Tue, 8 May 2018 09:04:08 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 15.CE.05700.80861FA5; Tue, 8 May 2018 10:04:08 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20180508090407eucas1p13713284c2d3f5aa5c66f8d136be683c1~sn-TLD1ww0803208032eucas1p13; Tue, 8 May 2018 09:04:07 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180508090407eusmtrp26963e74455d72f5ef328bf4a8f2ffa5e~sn-S6orco0560305603eusmtrp2R; Tue, 8 May 2018 09:04:07 +0000 (GMT) X-AuditID: cbfec7f2-1dbff70000011644-8d-5af16808cd46 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 60.DF.04183.70861FA5; Tue, 8 May 2018 10:04:07 +0100 (BST) Received: from [106.116.147.30] (unknown [106.116.147.30]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180508090406eusmtip1fc3067387012578be73101bd861008f3~sn-SiLiks0440804408eusmtip1A; Tue, 8 May 2018 09:04:06 +0000 (GMT) Subject: Re: Revert "dmaengine: pl330: add DMA_PAUSE feature" To: Frank Mori Hess , Vinod Koul , dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dan Williams , r.baldyga@hackerion.com, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz From: Marek Szyprowski Message-ID: <53b13d76-16a1-0e0a-09e1-c917e5d49326@samsung.com> Date: Tue, 8 May 2018 11:04:06 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <2484918.HKVQc3yJkt@bear> Content-Transfer-Encoding: 7bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMKsWRmVeSWpSXmKPExsWy7djP87ocGR+jDPacFrbYOGM9q8X0qRcY LVZP/ctqMf/xXDaL8+c3sFtc3jWHzeLuv0+MFjvvnGB24PDYOesuu8eRncfYPBbvecnksWlV J5tH35ZVjB6fN8kFsEVx2aSk5mSWpRbp2yVwZXw8dIe54IxoxZ75F1gaGK8LdjFyckgImEg8 uX2PuYuRi0NIYAWjxMOmzcwgCSGBL4wS6zYUQCQ+M0r8XNzNCtNx5u5yNojEckaJsy0dTBDO e0aJ7tdzWECqhAVsJdq3nGIDsUUEkiQ+fL3AAlLELHAYqGjlDrAiNgFDia63XUBFHBy8AnYS R5fwgoRZBFQkrvzawARiiwrESEybdx3M5hUQlDg58wlYK6eAmsTEI+/A4swC8hLb385hhrDF JW49mQ92kITAMXaJD7cvQJ3tInH2+A82CFtY4tXxLewQtozE/53zmSDseom+70egmnsYJfa2 TIVKWEscPn6RFeRQZgFNifW79EFMCaAnf25IhTD5JG68FYQ4gU9i0rbpzBBhXomONiGIGWoS s46vg1t68MIl5gmMyrOQPDYLyTOzkDwzC2H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kvlu5F755OWX/9VoKf /lLtI9xL2e7uNLheeWD5LJ7MZ1nzNvpHBDWGnDq1xHlHgt6vpjf9MVNuTik/KHypRWiTqQpT bMKjaXsVvGZPvyN5IFlNRzO1eO7/Qpfw8wfLz12yFA5jfRsgP/XyhR8ekvMMHxZPqNs822/G vivrOBeXbV9yeuZpJZbijERDLeai4kQA/osRGtoCAAA= X-CMS-MailID: 20180508090407eucas1p13713284c2d3f5aa5c66f8d136be683c1 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-MTR: 20180508090407eucas1p13713284c2d3f5aa5c66f8d136be683c1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180508090407eucas1p13713284c2d3f5aa5c66f8d136be683c1 X-RootMTR: 20180508090407eucas1p13713284c2d3f5aa5c66f8d136be683c1 References: <2484918.HKVQc3yJkt@bear> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frank and Vinod, On 2018-04-28 23:50, Frank Mori Hess wrote: > This reverts commit 88987d2c7534a0269f567fb101e6d71a08f0f01d. > > The pl330.c pause implementation violates the dmaengine requirement > for no data loss, since it relies on the DMAKILL > instruction. However, DMAKILL discards in-flight data from the > dma controller's fifo. This is documented in the dma-330 manual > and I have observed it with hardware doing device-to-memory burst > transfers. The discarded data may or may not show up in the > residue count, depending on timing (resulting in data corruption > effectively). > > Signed-off-by: Frank Mori Hess This revert completely breaks serial driver operation on almost all Exynos SoCs, because serial driver relies on having PAUSE feature and proper residue reporting from dma engine. Please drop it if possible. > --- > drivers/dma/pl330.c | 28 ---------------------------- > 1 file changed, 28 deletions(-) > > diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c > index 6237069001c4..f802bd3b0481 100644 > --- a/drivers/dma/pl330.c > +++ b/drivers/dma/pl330.c > @@ -2290,33 +2290,6 @@ static int pl330_terminate_all(struct dma_chan *chan) > return 0; > } > > -/* > - * We don't support DMA_RESUME command because of hardware > - * limitations, so after pausing the channel we cannot restore > - * it to active state. We have to terminate channel and setup > - * DMA transfer again. This pause feature was implemented to > - * allow safely read residue before channel termination. > - */ > -static int pl330_pause(struct dma_chan *chan) > -{ > - struct dma_pl330_chan *pch = to_pchan(chan); > - struct pl330_dmac *pl330 = pch->dmac; > - unsigned long flags; > - > - pm_runtime_get_sync(pl330->ddma.dev); > - spin_lock_irqsave(&pch->lock, flags); > - > - spin_lock(&pl330->lock); > - _stop(pch->thread); > - spin_unlock(&pl330->lock); > - > - spin_unlock_irqrestore(&pch->lock, flags); > - pm_runtime_mark_last_busy(pl330->ddma.dev); > - pm_runtime_put_autosuspend(pl330->ddma.dev); > - > - return 0; > -} > - > static void pl330_free_chan_resources(struct dma_chan *chan) > { > struct dma_pl330_chan *pch = to_pchan(chan); > @@ -3027,7 +3000,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) > pd->device_tx_status = pl330_tx_status; > pd->device_prep_slave_sg = pl330_prep_slave_sg; > pd->device_config = pl330_config; > - pd->device_pause = pl330_pause; > pd->device_terminate_all = pl330_terminate_all; > pd->device_issue_pending = pl330_issue_pending; > pd->src_addr_widths = PL330_DMA_BUSWIDTHS; > > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland