Received: by 10.213.65.68 with SMTP id h4csp568951imn; Fri, 16 Mar 2018 11:48:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELtqBBCwZp896OGwuF/cHc3KiMfMs8spCFN+6TF6IWQrzcuLfxv0f00HY5gTGhcxfdPbIvjU X-Received: by 10.99.63.14 with SMTP id m14mr2238271pga.174.1521226088034; Fri, 16 Mar 2018 11:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521226087; cv=none; d=google.com; s=arc-20160816; b=ZNm//qz+ttS1VVHsqYjy9r68FW5r3/dKSC6/MwBiZgFR2Ia7W3Vcf7VjnUYpQmtoFl hcqvicZl4l261bLectT3XC+OuPlm1McBI4lMKq8FullzhpHuN6l5UbMqItTaFloeiNBT B1L+jf5T1v4UmtFuv65nZy+2assMmy+XSnO9GpzFhT7dX5s3YSZDbXr/KqbsmgDPfOaD GAsoLAwS30cHKK5oHTbwjzYjXOwiTG4aiiHo3xF758Gq3B9kYgmBpnqLdlkhKP1RaJ3S vZhb7AAyMOifbnhhzV7af6vosKsLuYKr1Wmz6X3BFlOmrzX98uUisScBjHfp/ow75Hmm t7qg== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=HILcNJFB0yHExCCff5YhbXA+USMGSQDF6qs+Iv/IIs4=; b=NMTYtSPJE68a5idQFFqYZg2tmkCk5Spd3Uop2o0tifnR8SVlKgUoKhSSISXjMF0rVz jwijXIic8IqgDEYAwGVqOZ2qiYUPxM5jH9yOASWgo3ctHI45ISuCTtvJ/FvB8+DM0ZFm JMHUZ3Rv3g+qvl7wlaix9BG6lUAC3Y/eQRDVZApzDbOgrC+uqDRmd3s4sHnrB8CPG6KD wfvw6nJeiAcIrWQ881gKSBgFWQBnxLhOdHI1N31X7BYFpvEdTta/atVyIiXMFN0ZO5bz ovao6lyPaxwQzpidpk6tiT76FV3wJAgR4skL3Md0KSNbJWa0elq6rgl5MQoKXrQCRQy8 7/Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e4LJmQpI; 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 v187si6052794pfv.25.2018.03.16.11.47.53; Fri, 16 Mar 2018 11:48:07 -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=e4LJmQpI; 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 S1751665AbeCPSqw (ORCPT + 99 others); Fri, 16 Mar 2018 14:46:52 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:52518 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877AbeCPSqu (ORCPT ); Fri, 16 Mar 2018 14:46:50 -0400 Received: by mail-it0-f67.google.com with SMTP id k135-v6so3253133ite.2 for ; Fri, 16 Mar 2018 11:46:49 -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:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HILcNJFB0yHExCCff5YhbXA+USMGSQDF6qs+Iv/IIs4=; b=e4LJmQpIB1RuHd7PdzvhNHXO5PDnwpFD4sDUTqbSx7gGF6jYwFzcVBucXBgF3+NEbq b3S1qP2LsxZ6DPoXHpyEyjMkOv1HK9z71aS+dltPusS/KHcq1EqUPVzxhMWvgi0Rd3BH 9vmf2zJLQDGeihAbIpw4LxumgUo0hcQQE6Y30= 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=HILcNJFB0yHExCCff5YhbXA+USMGSQDF6qs+Iv/IIs4=; b=h1exIVWbn0KY0tKp75r3QCca1bWJVznBmWcdz05gFFABYfJmTNanA10KcbR+YliaNQ 7QQ4TrkPbxhAGQ2N2MDRDHXeEUoYfpCGZnum/B7/eC25PZQ0V+iB9NhuVCan6WSuzwya PY8Y7lSTJ6RvJAc9pPqJjutgjO0d+qJVy9JmHyWPd5UV1Ap0Gdk3fUSWzZHjZqOH94z6 u8ESAWDnO56cF20hEBaylG3SmNWxBjWqaLtpAquGs7hSxrgX4XTLk7EavtiIs519CVFz r4IMkbsp9K7GLrM42rtbLSWNfThEvGlqLCizQ3roZh9Sbr4MK0IgN5jMj5athM9XRmv9 ewOg== X-Gm-Message-State: AElRT7GNkNXdqfsy2BlLvpaXEnp3nhtsFvDPdsCWqLm7MXzeI2mPlLL5 oVPx3HLhe23eOntRLWAv4Y8+tA== X-Received: by 2002:a24:6995:: with SMTP id e143-v6mr3211110itc.119.1521226009123; Fri, 16 Mar 2018 11:46:49 -0700 (PDT) Received: from localhost ([12.130.118.48]) by smtp.gmail.com with ESMTPSA id d128sm5140048iod.19.2018.03.16.11.46.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 11:46:48 -0700 (PDT) Date: Fri, 16 Mar 2018 13:46:40 -0500 From: Dan Rue To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Ujfalusi , Eric Anholt , Vinod Koul , Sasha Levin Subject: Re: [PATCH 4.14 064/109] dmaengine: bcm2835-dma: Use vchan_terminate_vdesc() instead of desc_free Message-ID: <20180316184640.rxw6kwvqghsmdgcc@xps> Mail-Followup-To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Ujfalusi , Eric Anholt , Vinod Koul , Sasha Levin References: <20180316152329.844663293@linuxfoundation.org> <20180316152333.462064800@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316152333.462064800@linuxfoundation.org> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 04:23:33PM +0100, Greg Kroah-Hartman wrote: > 4.14-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Peter Ujfalusi > > > [ Upstream commit de92436ac40ffe9933230aa503e24dbb5ede9201 ] > > To avoid race with vchan_complete, use the race free way to terminate > running transfer. > > Implement the device_synchronize callback to make sure that the terminated > descriptor is freed. > > Signed-off-by: Peter Ujfalusi > Acked-by: Eric Anholt > Signed-off-by: Vinod Koul > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman This patch is causing a build error on arm and arm64 per i.e. https://kernelci.org/build/id/5aac017e59b5141cb1b3a4d5/ Builds are also failing for arm/arm64 on 4.15 and this patch seems to be a problem there as well, but I have not verified it yet. # # make -j10 -k -s ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=build-arm64 defconfig # # # make -j10 -k -s ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=build-arm64 # arch/arm64/Makefile:48: Detected assembler with broken .inst; disassembly will be unreliable ../drivers/dma/bcm2835-dma.c: In function 'bcm2835_dma_terminate_all': ../drivers/dma/bcm2835-dma.c:815:3: error: implicit declaration of function 'vchan_terminate_vdesc' [-Werror=implicit-function-declaration] vchan_terminate_vdesc(&c->desc->vd); ^ cc1: some warnings being treated as errors ../scripts/Makefile.build:334: recipe for target 'drivers/dma/bcm2835-dma.o' failed make[3]: *** [drivers/dma/bcm2835-dma.o] Error 1 make[3]: Target '__build' not remade because of errors. ../scripts/Makefile.build:587: recipe for target 'drivers/dma' failed make[2]: *** [drivers/dma] Error 2 make[2]: Target '__build' not remade because of errors. /home/buildslave/workspace/kernel-single-defconfig-builder/defconfig/defconfig/label/builder/Makefile:1031: recipe for target 'drivers' failed make[1]: *** [drivers] Error 2 make[1]: Target '_all' not remade because of errors. Makefile:146: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 make: Target '_all' not remade because of errors. > --- > drivers/dma/bcm2835-dma.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > --- a/drivers/dma/bcm2835-dma.c > +++ b/drivers/dma/bcm2835-dma.c > @@ -812,7 +812,7 @@ static int bcm2835_dma_terminate_all(str > * c->desc is NULL and exit.) > */ > if (c->desc) { > - bcm2835_dma_desc_free(&c->desc->vd); > + vchan_terminate_vdesc(&c->desc->vd); > c->desc = NULL; > bcm2835_dma_abort(c->chan_base); > > @@ -836,6 +836,13 @@ static int bcm2835_dma_terminate_all(str > return 0; > } > > +static void bcm2835_dma_synchronize(struct dma_chan *chan) > +{ > + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); > + > + vchan_synchronize(&c->vc); > +} > + > static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, > int irq, unsigned int irq_flags) > { > @@ -942,6 +949,7 @@ static int bcm2835_dma_probe(struct plat > od->ddev.device_prep_dma_memcpy = bcm2835_dma_prep_dma_memcpy; > od->ddev.device_config = bcm2835_dma_slave_config; > od->ddev.device_terminate_all = bcm2835_dma_terminate_all; > + od->ddev.device_synchronize = bcm2835_dma_synchronize; > od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); > od->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); > od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV) | > >