Received: by 10.213.65.68 with SMTP id h4csp384155imn; Sat, 17 Mar 2018 07:30:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELv2NxJc+pSg/YMeEspr2K8OJ8WXu/+B3f4rQlPqgmJ90Nt2cALiusBCCmnx+MmD0OIlLjvW X-Received: by 2002:a17:902:12e:: with SMTP id 43-v6mr5756188plb.77.1521297006674; Sat, 17 Mar 2018 07:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521297006; cv=none; d=google.com; s=arc-20160816; b=YcS/2nNjGqaqbXuvHPRRboq3MoJhYzyyvzPbwuMBtfAnW8ZCecrP4HCHHY8uS0IgEv j3lccokj02atkWLWHFr3RRvFJ3J1w5R+/aTs+5nwtQrwIKfRv2SYRPwFQeepS1gbm/9L 1VG30lKpgjwmJq07cLRV3Bgjwl1+2GA43ZzxFWUf+aKblaklNNG6u2oS8Rl487Y1Bx3n OmTaFruGRnb0X/dB3lFP4NKanI3RzCyYrkDXy9toCE2ePkPQI0lTy6XaiPBI8x9s0YYR STWtLnuXaJpJCBL3sMYU5HjeAN9TvZvWTc7YelIixBMI8HTW8XAlTCvIpYSnFbskkaT4 WsFA== 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:to :from:date:arc-authentication-results; bh=XzZDGK2n3/UTXWp1QktE9FO1hB8cL3KjZVLMkS625/Y=; b=0WN9q6TV4L2mgHq+mEQXgK5wz7i+8bgEdH6sesN7+Yranm+rYeLvXSntkeWgrR/LyX IZZACY8wmhQZJkCi2bSK8KvS90EokdUwYFbMOGqreqUMexIWIp1+RzDwGfqFqDHf0bI8 ukDbMG5WzthtwRuYS6IS8Xh8pvUpSA8y/3jLTMoXISifvtSMXp0CL3sANQHxcWWflpNL 2AhoaGpuqqzWwY/3/4yRo/30Ylt79cNlqvih0QsmehcJzVMVwWKZilfLN5WbWgKOUFV/ 3VWmIZU9NzlEviPZCNKi/EhmD8vL0KuiDn00Jq5Yls4VulGOTprTtYraQZj2CRGlLfc2 Qt+A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t75si6914962pgc.156.2018.03.17.07.29.52; Sat, 17 Mar 2018 07:30:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020AbeCQO24 (ORCPT + 99 others); Sat, 17 Mar 2018 10:28:56 -0400 Received: from mga02.intel.com ([134.134.136.20]:48788 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbeCQO2y (ORCPT ); Sat, 17 Mar 2018 10:28:54 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Mar 2018 07:28:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,321,1517904000"; d="scan'208";a="26100353" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by orsmga008.jf.intel.com with ESMTP; 17 Mar 2018 07:28:51 -0700 Date: Sat, 17 Mar 2018 20:02:57 +0530 From: Vinod Koul To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Ujfalusi , Eric Anholt , Sasha Levin Subject: Re: [PATCH 4.14 064/109] dmaengine: bcm2835-dma: Use vchan_terminate_vdesc() instead of desc_free Message-ID: <20180317143253.GI15443@localhost> References: <20180316152329.844663293@linuxfoundation.org> <20180316152333.462064800@linuxfoundation.org> <20180316184640.rxw6kwvqghsmdgcc@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316184640.rxw6kwvqghsmdgcc@xps> User-Agent: Mutt/1.5.24 (2015-08-30) 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 01:46:40PM -0500, Dan Rue wrote: > 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. I think we are missing commit 1c7f072d94e8. Pls cherrypick that as well commit 1c7f072d94e8b697fd9b70cdb268622a18faf522 Author: Peter Ujfalusi Date: Tue Nov 14 16:32:04 2017 +0200 dmaengine: virt-dma: Support for race free transfer termination This adds vchan_terminate_vdesc API.. > > # > # 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) | > > > > -- ~Vinod