Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756584AbbLAUXJ (ORCPT ); Tue, 1 Dec 2015 15:23:09 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:57053 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756103AbbLAUXG (ORCPT ); Tue, 1 Dec 2015 15:23:06 -0500 From: Arnd Bergmann To: Andy Gross Cc: Stanimir Varbanov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, Vinod Koul , Rob Herring , Rob Herring , Mark Rutland , Pawel Moll , Ian Campbell , Archit Taneja Subject: Re: [PATCH 3/4] dmaengine: qcom_bam_dma: use correct pipe FIFO size Date: Tue, 01 Dec 2015 21:22:26 +0100 Message-ID: <362271933.gkEJO2V159@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151201172535.GB26687@Agamemnon.attlocal.net> References: <1448961299-15161-1-git-send-email-stanimir.varbanov@linaro.org> <1971752.Auss6gPApO@wuerfel> <20151201172535.GB26687@Agamemnon.attlocal.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:4CPiWmXigvwsz2C/Cn/P638GhcqWRgMydm0ohr5fF1WrRCs6Drn iJIQunYw4Qf3Q4M3qFTXr+pINoSLbd0MEbHzV6vkeV6J0MKhfU2phsM5ZReCb2JqO8XeoEf 7+8hgI6zmABcO8vLJH16Vde3BVhMtICDPc2ScEzBMq5WM1TJ8791SSmOx2VLzzFND6EBGHH b/7iefmR/tVdx8WkbyXyQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Dvp1qb1/xLU=:zdfnLalklRB+9RQkP+OMrz R7ehj3LQ9o3Pw88JDo/N6taC6KgNOUennzmwMUExdsjUZ44GxEANT1vPhuRZEwUTgXHL8Zx5t fUrf2rmeoIar5tVVRyb6Vo3zLCvK+Vqt/2oHpthySRcf9nRlPI0Vjt8wht4kHp2KhGJDHGwmC bWII+AiMwLx5lmiSGpAP1lblubvBE3hiik1waMOUuDFikya5RknzrkQe1/yVWvKdJE4nFnbkX hf090hYDG/PW7URnAXiBrGqwWjqYVk11L92t/poAKm2nCM9+Y70Sh+U1VQAIfoeReZVqHXmXQ 6ZBU/41MIxyPrrrFbsQKZrFcYNdmgdt1GKjgtaZAKeQBn0ZmbCSEBe/lndY72Nizns1YutnXz /RUjeudJFzeFdcejfa6fYGxv0y5QqM/8DBoyzcd+PXcG57mhIQFYfI8e2rQhD8RgVfy1pv/zS XrdS/ulRFfa7gNcyXO/Z3BrbLMm0/9dn1vxQzgdHcxp1G7kCEcva3aNFY3NOh09qrLnadMhN3 mVyeO8aCZH4WBO8HHkKUxGNYGOrYtoGiIuTimhZuITf081WjBKH0Mhr7uMiu3MjKx1zFmtxUa aVm7PfSqjY0VTGnsSCsGBthTwltwpWsYMzw0fss0cFLgx58ULpoOVyjB6uiw6b5J4gqd6cvEx AjTI8HO81pKCEZMf45DH5/1i+ZRix9Q8xMueHyaq0M0D5n7iApDR+j7zXL0Akl54KujaiVh2o o4aYOOw+OOBmu1c+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1930 Lines: 41 On Tuesday 01 December 2015 11:25:35 Andy Gross wrote: > On Tue, Dec 01, 2015 at 11:28:32AM +0100, Arnd Bergmann wrote: > > On Tuesday 01 December 2015 11:14:58 Stanimir Varbanov wrote: > > > > > > diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c > > > index 0f06f3b7a72b..6d290de9ab2b 100644 > > > --- a/drivers/dma/qcom_bam_dma.c > > > +++ b/drivers/dma/qcom_bam_dma.c > > > @@ -458,7 +458,7 @@ static void bam_chan_init_hw(struct bam_chan *bchan, > > > */ > > > writel_relaxed(ALIGN(bchan->fifo_phys, sizeof(struct bam_desc_hw)), > > > bam_addr(bdev, bchan->id, BAM_P_DESC_FIFO_ADDR)); > > > - writel_relaxed(BAM_DESC_FIFO_SIZE, > > > + writel_relaxed(BAM_MAX_DATA_SIZE, > > > bam_addr(bdev, bchan->id, BAM_P_FIFO_SIZES)); > > > > > > /* enable the per pipe interrupts, enable EOT, ERR, and INT irqs */ > > > > I'm looking at that now and fail to see why these have to use writel_relaxed(). > > At some point I believe I got a comment about using (readl/writel)_relaxed > instead of readl/writel. So I used these instead. Has the wind direction > changed? =) Yes. > Using the readl/writel is nice w.r.t. having the implicit barriers, especially > with the funky 1K boundary on reordering of operations that can occur on Kraits. > This can hit you on accesses even within the same IP block. We had a couple of bugs that we should not have had when drivers were mindlessly converted, so generally speaking at least I try to get people to only use the relaxed functions for the hot path when they can show an advantage as well as the fact that it's safe to use. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/