Received: by 10.192.165.148 with SMTP id m20csp5168533imm; Wed, 9 May 2018 00:01:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZojdC8CQF+POBW10Davv0bKJJPDF5bH788uCF2UMEiZzywUGhE1oaSFXUaD7KAiobhZcz/7 X-Received: by 2002:a17:902:b58e:: with SMTP id a14-v6mr20019964pls.261.1525849261088; Wed, 09 May 2018 00:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525849261; cv=none; d=google.com; s=arc-20160816; b=SerDM9O1AaUz1cMiecxHcsC35vSHDokHpAwy5H8BUshW6bWyDaqcHv+THtfXPLazO2 4TkHj1wLScLsIY1CzAsAFLNFL8CxqTSjli3bF+1Wsyv3N9RmAseHLVOI4PYVqpao9/FQ cIJMG2KAeOodBx9yD4b78TuuYdFkCZPwkD53i3EBC+W6oZalN6oUVk/Y7l3CvzAavO4+ iDRhJQIq+D7TvF5YAoi+87CbDxc/Ot3e+s0KM7bAzkmECI9U91X7ixRZq8/uthS6g6f9 sNf2PDclieiYwhHvlFP4SdufiqPGNULl94540AHnbQcvfhw1HJKSdjcIXxI3b9LljygG zIuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=lOOTwgxEHya+Ceq67refUA7hDHXH3hb4kpBsEiamwz0=; b=Y2JoLwmjqRPSvCAiizE1yaJ/S4myMDi8CHDBCA1JxyICpTJFfiYkWhxkn+1U9vUSbe WEVhCJS8Ba0MV8Wi2AizVKiU1FXlLW+IddZyk7ZzLbj9canX3PxFrWclEabw+K9YFid7 sm0oQA+vN6O6wgzph4eUcfbcqnhWqr1Tb8IOW13ajWWvE0GoPunPJVctlilobWiBCqoj noAwzPcUgwfstawV8mepyZbx21X06bLpjYUZtcKViVxz5i2wNtxDoOPQalhde2TLNg9e y8M5x2bMTncin9U3O/7z+Tcw8hiBuySuaWS2ToyIl5Szjd1LgBEXrHpGBoCk5Pqn/MSr HoHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GHlZIi7t; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si17768644pfe.158.2018.05.09.00.00.46; Wed, 09 May 2018 00:01:01 -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=@linaro.org header.s=google header.b=GHlZIi7t; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756116AbeEIG71 (ORCPT + 99 others); Wed, 9 May 2018 02:59:27 -0400 Received: from mail-pl0-f44.google.com ([209.85.160.44]:44814 "EHLO mail-pl0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbeEIG7Z (ORCPT ); Wed, 9 May 2018 02:59:25 -0400 Received: by mail-pl0-f44.google.com with SMTP id e6-v6so3737939plt.11 for ; Tue, 08 May 2018 23:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lOOTwgxEHya+Ceq67refUA7hDHXH3hb4kpBsEiamwz0=; b=GHlZIi7tk1gq9C2kRkamwSuSpXC4CdS0D6SQas+UKm4dKjgZEVuBCO12C9viayMwQ/ z/V6YswTLLaeSM+CJFbD+mMamit7+5YK7MCS1mD2CPleFHQN7DmfwA6WrG9tuOrazYvb EqZkMhx/a82aATzvUgC+f6LHzNqHlLaicgxFI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lOOTwgxEHya+Ceq67refUA7hDHXH3hb4kpBsEiamwz0=; b=byf+xwyt4ofuJPyRmxwf6y0jXyAhVqKPTMPpohFP27phkh225kpD0QCCVtxWOzueI3 qddpT8TLnPCn//RY8TkWDFzT3YG5oVM5I2bdGTyOFdaQqfhRXCYeSiXU8TTMD2ysnuGm LQm7Mn6aDzSCvNwoFpzsFt7/FRzU0L0Fi/zack5XGxWyjA1pAmplCsD0cpTTUqb1/YLG 2AuvCKimFxlqz/Yl8EQTWQwyDBrMuLwjuCBbVbMdG0zgVn5DsIKHHfvc22naYfIRKDtk I4bYAeV+6l/aUVic4SY7bhztWKMqfpu14SFDPS4XnkP6B09cd0LR/lQVS2aFHKf7AaQF 3FYg== X-Gm-Message-State: ALQs6tDX4t3oPdW6zmcgiE9zWjBOY3zEzJnfZsGF6fR25omZSrPrfZjb cAfi6qEPMDbc+PvCo9aIOEWx5A== X-Received: by 2002:a17:902:8f8b:: with SMTP id z11-v6mr40544645plo.203.1525849165099; Tue, 08 May 2018 23:59:25 -0700 (PDT) Received: from localhost ([106.201.37.241]) by smtp.gmail.com with ESMTPSA id c87sm3575102pfd.78.2018.05.08.23.59.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 May 2018 23:59:24 -0700 (PDT) Date: Wed, 9 May 2018 12:29:22 +0530 From: Vinod Koul To: Frank Mori Hess Cc: Marek Szyprowski , Vinod Koul , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Williams , r.baldyga@hackerion.com, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: Re: Revert "dmaengine: pl330: add DMA_PAUSE feature" Message-ID: <20180509065922.GC7985@vkoul-mobl> References: <2484918.HKVQc3yJkt@bear> <53b13d76-16a1-0e0a-09e1-c917e5d49326@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-05-18, 10:36, Frank Mori Hess wrote: > On Tue, May 8, 2018 at 5:04 AM, Marek Szyprowski > wrote: > > 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. Hi Marek, I would appreciate if you can review the pl330 changes as that clearly seems to impact you. This was in review for quite a bit > It will cause the serial driver to not use the pl330.c driver for dma, > the serial driver will fall back on using the cpu. This is > unfortunate, but the dma hardware simply does not support pause. The > "nice" stop instruction DMAEND is not allowed to be inserted using the > debug instruction register. The only possibility for implementing > pause would be to make the dma transfer do a DMAWFE (wait for event) > before every transfer. Then you would need to devote another dma > thread to doing nothing but DMASEV (send event) to keep the transfer > going. The pause could then DMAKILL the event-generating thread > rather than the transfer thread. I don't know exactly what the > performance impact would be, but it couldn't be good. > > The serial driver could be modified to still use dma for TX, since it > only needs pause for RX. Also, if your serial hardware can report > exactly how many bytes it has sitting in its rx fifo, the serial > driver could be modified to use pause-less dma for RX. This is > actually what I did for the custom serial hardware I'm using with a > dma-330, although our serial hardware has a very large rx fifo which > makes this scheme worthwhile. That makes sense to me. If dma doesnt support, then why should SW claim broken support.. -- ~Vinod