Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp953742lqt; Fri, 7 Jun 2024 04:01:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUVHGkUCTRCsyvZOpUn28cCw27rrqPv1wmMSijNGgV2zrfp7rc0HuIOhvsz5ZWcz/9AgZ29f0wSoj29Z+8Nibf8BKirLpqDC/5Qk7qwQ== X-Google-Smtp-Source: AGHT+IGc9sdUjhcEfyKZCYypZRBuQCnOsBal72WDcAWBddzkdjakJSI+gfFRGRkhlrbO+IuEs8MZ X-Received: by 2002:a05:6102:198b:b0:48b:e1a2:1b95 with SMTP id ada2fe7eead31-48c272b8494mr1898348137.3.1717758070486; Fri, 07 Jun 2024 04:01:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717758070; cv=pass; d=google.com; s=arc-20160816; b=shBKYdqtErk4lWBAnfzZopf/4Bx3muQIwxX/07LIRiPkEVfuFicYu+v9aPYSSt91HB TnHw9dBofhRwGTp6OUkiJMAfovIuttZDdSJdiVn9DePcsGUNQht/8s+aA4msLE8KDVWP j2WGELz7AVDmgN3LLYDNU9NAEVi/ILVCvTQB+Xy+XdF1DVVo8qOYvmtNNgJ2wgO+fMmn d4jfvXxgUWPjstjYw9mqziywZ0j7/mSvVWqYoXHYyYldsIVudYkzp5jl5Q11ulpKAlwV r4D2zYMLFHFBHnqGLNf8DvNeYgp8xN4Dnxtc6u/JbcxXST//ZRArE8lCL37BpVKFo0AP Uewg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=IhW5vpsMEF6oM47c6btwxu3Ln8LJNCv3Ogz2x3bYGGY=; fh=qa3S4+Lnhn3Rc77HNyfDnOy0o7HKd2jchCXxpn1iAbE=; b=u0txPS7rG1uc0ss2mDN39p9EmuADECMm0K3+EwiMqIxjAGQXMvqPVroXZRMA8r97Ai Fz6vtcIjjMYzKUEW2CThflkUQs2VtgSfhqjcRLqPrI3+8gGaglgrcESnNICiWCI41gIw RWcMcmDZRHf6lXEEJZv/UAla+OrVzbUlfJNHBOXGmTy8P3EefLpl0/6SvTMY9lgW7huC 6VUykoQ1eMMEYf25lKUK6EzIti2H+cwXA9Zu9G8xxIXkGaz5jbR9jY9kOa4Qzw2tOx8W hNm6vtKIazdn2O5hY9hr0GkyzQQvgDRfko1O++6Hv4lqKXNgzlh3KeOhbGwzwPZ/V1i3 oZsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=voYI5waC; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-205859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ada2fe7eead31-48c20c07a10si681996137.426.2024.06.07.04.01.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 04:01:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=voYI5waC; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-205859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 32CDE1C235BE for ; Fri, 7 Jun 2024 11:01:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10B391862AD; Fri, 7 Jun 2024 11:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="voYI5waC" Received: from mout.web.de (mout.web.de [212.227.15.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8214152530; Fri, 7 Jun 2024 11:00:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.3 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717758061; cv=none; b=nOE8tp52pUm0A/BbEqEfknUxU/gJ+cGfyfJET27NuNe+kLVvLc+ETP/Kyck83rxquMrbX+meEhpFLaY160KXZHbsxlVlU36Fb83bidSZsxgo4u0M/yWlBOPVgpaIAm0OsnTe1fvYTAXTmxJm7e78ELcdQUCbnNUfT+ecaN+xmzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717758061; c=relaxed/simple; bh=PYBDXW1bgAq8z8hyPZRjTK33dIFpn/74BViS5VSNeIo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ey9yvf1tV6WRQdFEm1tVTEvE1GyYpylHgPIy+brqoiQNxioMiiXiepSwS/+krH7B/wqNnsrUCENQWR14B7e1yt10f4sDIQNue2iLNWrNigcrHfKqadGhJuFoPqBWnMP78ms3KFT/gLqm4+IOSn+3f9yxo1Wg+apMeUUU/spGaZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=voYI5waC; arc=none smtp.client-ip=212.227.15.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1717758021; x=1718362821; i=markus.elfring@web.de; bh=IhW5vpsMEF6oM47c6btwxu3Ln8LJNCv3Ogz2x3bYGGY=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=voYI5waCAWK90Hkf6VsiDMqz3Q79jVJp46bqwaP7vzBhthOmcVdsR1tJv/fpxZqp 7nCIIm4xYZTUmhoQ+1cNoEL1dTOIvDcHhTAAXUVAi9bDxfQm29k1oEqHRWg8jY+Vl zzUkgba45soV3mH9iSTr1CMR54gT0ZbmkyqkwCNVuhNFNC8arHi/XHZvMBsIPTM8I dow8SWx86aFHp5dfH3jUZKrxaGAzNvi1DqW3ibumgmDAq7kJrKXnTtqFyP2dKxwnx fkqb5lduq9kjV198HN2/7OJoDlwFXULysMr+ANiTy+dDXc/S8Dm2l9n0mC7DEk7dd NPt0NbWiT28uLZdJnQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.83.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mft7t-1svTvY2naj-00n9hn; Fri, 07 Jun 2024 13:00:21 +0200 Message-ID: Date: Fri, 7 Jun 2024 13:00:20 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr() To: Louis Chauvet , Lizhi Hou , Brian Xu , Raj Kumar Rampelli , Vinod Koul , Michal Simek , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20240607-xdma-fixes-v2-1-0282319ce345@bootlin.com> Content-Language: en-GB From: Markus Elfring In-Reply-To: <20240607-xdma-fixes-v2-1-0282319ce345@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qMKv+pscBjHW9lTpGPCxoG4AtlhN/1w5uQrP4IcHwLCdyT9LaAF pxnwHOZ3kovQB+gMDFK1SPxvxAZOQV5KR3R3dZYB4U4+kYRQKcrR9y8xfBWl27pDf0Lv+Jh +lj2y835hfBopQGcVC81yHAErCkizTODlGzkGolloRlE3Lew1V72XG9ucswdxcIyBVV93Rj mvxIk/GKwUJNK5XuKDhJQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ZGEkmf+aAVU=;Z3Ng3uPnW/ZXnqCjf23PD3CLyqQ Nw+YuHt0WkNK5QE+6h41+qD1gzH5KKWUxhmRNGOLPC5WzgUC8XXObf0Hllu4gsI8M1lUsCiyJ nveY7fGVDJXU3rENekbrIYjVBf+YS2QaOvK9ZwnMCYw9TvLBRnGPVK0ZZxs7SSvinTm7unOba qSe/y/U2Vilx20HNKFEa9iah90/xG3WWIPk1jdEnsfOvJ4J0oScibrxmOnpZ5BfaNpNMf7iVQ 1pMYrBpKjemvK4/5zyv37lZOMnCcxRedXkWtY7DCOxkrucLWyIRDwwXOHueAx92NpUG6eWC4w 6raqQpB9h0WUO2PL5Uqv7/aJkyob3aulBNXDLwjQrpBJb8FC076YIXA04w1LyZ8imZVcqyJqc je0cJ/1n4K6y5Hcx76KcMF7YRONDQYm37TRjejiLwVcRZ8ZlSd6j9JP7sVQr0yXFLtw7ZIP8h AsO0pgdM8qMYrHKNyHkgolIP++6daz/C3G9VT6LhFF1e/8U2IorS/IJykshYZgiRSidjucf8A 2f1jq9JtYCTynNPbWvlhpSmli0eBpES9ec13jcRHVcQWQMAhBBdIiTLpaPRAoNkNqYHRFjcps CnzPxfoo8lN/qCIdPQ6CRS02AdolWAznZhcDBUS+F/PBSrm6GDLnSbnd7GyZ7y3TSX7VW4uNR Ti1mzu9Ivsefr6XDg8s3yu0LoR9APmGSMhRpM1I5TfAo4xzFsK9/4ppeM54GqCrfrH1vm+6bj k9O0ApTQGjC+eaJ7E5dpHQp0w71OSG9DQrBL3w89U4jV3tK4sKUlmRHGy5YBKvrW6oPCsYIeX U4dMQikVc7aKkIXzuMgbO0yOpWJpKl4+hSEjmy7ZunTIc= > Requests the vchan lock before using xdma->stop_request. Better wording alternative?: A data synchronisation construct was missing in this function implementa= tion. Thus apply the vchan lock before checking the data structure member =E2=80=9Cxchan->stop_requested=E2=80=9D. > --- > drivers/dma/xilinx/xdma.c | 4 ++-- How do think about to avoid a duplicate marker line? =E2=80=A6 > +++ b/drivers/dma/xilinx/xdma.c > @@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void = *dev_id) > u32 st; > bool repeat_tx; > > + spin_lock(&xchan->vchan.lock); > + > if (xchan->stop_requested) > complete(&xchan->last_interrupt); > > - spin_lock(&xchan->vchan.lock); > - > /* get submitted request */ =E2=80=A6 Under which circumstances will development interests grow for the usage of a statement like =E2=80=9Cguard(raw_spinlock)(&xchan->vchan.lock);=E2=80= =9D? https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/cleanup.h#= L124 Regards, Markus