Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18029404ybl; Thu, 2 Jan 2020 17:06:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyC8BVYT25t+nr4nJyNDVJq/iLSRmcwMCrAwA9EESYYJ9QXdiNj8v3vayM4PFPgDTHSIkQ2 X-Received: by 2002:a9d:7315:: with SMTP id e21mr85978652otk.255.1578013564904; Thu, 02 Jan 2020 17:06:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578013564; cv=none; d=google.com; s=arc-20160816; b=Xw5yAyTCNfr7KUaqe/kEnVa+OmBVbBTuTbQRcT8fvmzletKRXzJAyJqZkUjRGLPJKn +l4ccfd9yis5XAKQwXcHBQBFbYrQQ+tVpL3nJiTTJ195Tm9HRRZm4rjcXsBqSnqVZxy6 dXBRG1PhbBHx2TZnzU4AsGnh4YO46W57Xoumfi2pgGQtbF+I6o6X9H+okUHoe+KD0+9r uR/KB83boYhJCxDSqDi4B9BMBHLEMKPF0nZANqe7KFNzGtvOcE6mzPQUG3iFIWAnciFN 57chSKBTdKRatQ2NGNVZw2C3u079s4Pw7rFJ28ODG5iTFq0ARZCgmIflVYNLCp3sLR+T Ucog== 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; bh=ozic6TqYruSpEFOoFH0HYCbh75txsD2Py+nk3nYG6TY=; b=Mu+ViTzvOzoAu/nMjRDoQh2DdQUy7Q2DTanjbEcDQU3k1zJIOs2BbjZDRmWdunQpmT 12Au1AXxJmdAKZrTIyk5cI5mFOvvHcyUjABZNOqDtQQjQjnDkswuUZVNm8m+Ep0wEYWv WTjSPkrfPr+osMskgmvNzzl7Y3rA+W2z0W7uOHJLMPLQu/0UPVgfrr9Tm3m+8s/tkE6F B9MurqvtSxPe+6F73ENlZA4u8gzC3tjSGht/cTLCNuYWVBcahmLswhDMPLbonz+EUjMe TAcgbeOBOktt8S1/eiXW+jVzoHZxQ5nCdRgV2bYnU6/dYt/av6e7Iq1tXCdT1wivuNh+ XWTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GUSzzbSi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si30471531oti.93.2020.01.02.17.05.52; Thu, 02 Jan 2020 17:06:04 -0800 (PST) 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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GUSzzbSi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727455AbgACBEV (ORCPT + 99 others); Thu, 2 Jan 2020 20:04:21 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:48846 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgACBET (ORCPT ); Thu, 2 Jan 2020 20:04:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ozic6TqYruSpEFOoFH0HYCbh75txsD2Py+nk3nYG6TY=; b=GUSzzbSipkopZxcOEAsxR1eXx +naIE9vf2wwM0xnkUQ4Z2N4Bo6DVI2m2mNhzq0GmRjcyej8pOkgi5liUyMIjKQ3lDEElkLYINxpjV TmUKS7jJtgGh3BkRKS20HozIzTdKDvJVL3FCRY+ajYYX0nsPVrYjh3K20F2RcIVsdLo2k=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=fitzroy.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1inBNq-0003Mk-Mz; Fri, 03 Jan 2020 01:04:10 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id 14FA9D057C6; Fri, 3 Jan 2020 01:04:09 +0000 (GMT) Date: Fri, 3 Jan 2020 01:04:09 +0000 From: Mark Brown To: kongxinwei Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, fengsheng Subject: Re: [PATCH] spi: dw: use "smp_mb()" to avoid sending spi data error Message-ID: <20200103010409.GG3897@sirena.org.uk> References: <1577352088-35856-1-git-send-email-kong.kongxinwei@hisilicon.com> <20191227002239.GH27497@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1giRMj6yz/+FOIRq" Content-Disposition: inline In-Reply-To: X-Cookie: Programming is an unnatural act. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --1giRMj6yz/+FOIRq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 28, 2019 at 04:31:53PM +0800, kongxinwei wrote: > > I'd be much more comfortable here if I understood what this was > > supposed to be syncing - what exactly gets flushed here and why > > is a memory barrier enough to ensure it's synced? A comment in > > the code would be especially good so anyone modifying the code > > understands this in future. > Because of out-of-order execution about some CPU architecture, > In this debug stage we find Completing spi interrupt enable -> > prodrucing TXEI interrupt -> running "interrupt_transfer" function > will prior to set "dw->rx and dws->rx_end" data, so it will result > in SPI sending error Could you update the commit message to say that, and ideally also add a comment saying something like "Ensure dw->rx and dw->rx_end are visible" please? --1giRMj6yz/+FOIRq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl4OkwgACgkQJNaLcl1U h9AkFgf/fypiFJ4eRlJVOmkAYnGY01lAChSELOS/91cDAaOXJSQhz/hwB/cdeHjq 2KYpCiICZDeG8FB6y6dvAWUMCkVxGH0WVGS9/OlnmI+aDoPjqyiyJ5R1a+bRBAcE YAaX12ARLr0uj9l9Fh6hhZxScRgit+ZKRB12T77pdyFFcoCh4kJLSD58D+78OmEO YUXkkBxX7cayLE5CKvl2UrQp8K18T4EKZ4YX7jDCUuY4wXkoScvm7G3ik25DhEJR jenBxAnbnw0De745jFhdI5VJygGUOF3caiWT3wc2tOIQwI1LJThI0cp4d3DRbphU XpWJcoIuRXqY+TfLjulA4WjTtGsDew== =Xa85 -----END PGP SIGNATURE----- --1giRMj6yz/+FOIRq--