Received: by 10.223.185.116 with SMTP id b49csp6074384wrg; Thu, 8 Mar 2018 01:07:17 -0800 (PST) X-Google-Smtp-Source: AG47ELsFfYwTfpwiltlGDHLN6xvKsZTKDgS0z5pJtWxP6QNwUyXkqfSIPdQqNcPxg7UrLiW1W0KB X-Received: by 10.98.60.15 with SMTP id j15mr25717950pfa.7.1520500037262; Thu, 08 Mar 2018 01:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520500037; cv=none; d=google.com; s=arc-20160816; b=dHPiBKdewXb51oT+O16HcbCKM5idaoPmeQ3o82Wd1DaYGSbUvRPhxk6x7qryxIuWmm TKeMUZgcLP7TDu5B06rN6G9IqmvLhfFCNe4NGyp/zOv9ohUCFPwCA/c2jaM9Dk+t+qGI 1ht+HvTLrmaxyZb6hwPPhyCWtvwAWHzXdkeC8iTMHcKlE9vdCgepdIV33Gyur+lpgudE Om57lQ5botGMaGwHY6Y29VEibG2nFWVSjzsA/ysmIlfBcs9FLVuPpW43nPurTvLdPiTw 7rfkJcsI3w0jeOEGoC+iRufTcDn3SMsltYdeDtbwIQa2gKC5Uo4kqkG7jABACYD0a1Nq FVwg== 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:arc-authentication-results; bh=p3DjFsF+jvxfo2fkEz2v6sOiRNPJxOb8jLl/qSwxPW8=; b=fXpqp+jmTfkQKcuxHExwwXdm80civReffmx/6Og7PGhMokRgRLkod3RjQXROfMcCKK vWZsp87trdHs05nYUs8BDKcUNIFtWVyDezrbRRpAB1rRvkMfMnQO5/Oh484T6v6jd2JG rWwYn/Aw0+IuGOlr8LEJbs3xunKwNWPgKJGj86zGfzzDR1u0buGY4FtUrwgjk8gEgp/q zL60zbzdyKP5BVqEUfgTS5vVqMtYZGyxl65CFXIwRtzsZAjcswdvN3kR+NA6tWtCWgV7 rjuKuUgQ+Uj/b58s6Fy4LJ2Djc9sfdNOUbntxcsv/sEsvJVq+pEovjJw9Dzw+Ed8zs5i 2UeQ== 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 o6-v6si11789171pls.583.2018.03.08.01.07.03; Thu, 08 Mar 2018 01:07:17 -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; 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 S935383AbeCHJFo (ORCPT + 99 others); Thu, 8 Mar 2018 04:05:44 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:46583 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754877AbeCHJFh (ORCPT ); Thu, 8 Mar 2018 04:05:37 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 97B08802B2; Thu, 8 Mar 2018 10:05:35 +0100 (CET) Date: Thu, 8 Mar 2018 10:05:35 +0100 From: Pavel Machek To: David Miller Cc: niklas.cassel@axis.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, Jose.Abreu@synopsys.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/4] net: stmmac: use correct barrier between coherent memory and MMIO Message-ID: <20180308090535.GD17761@amd> References: <20180302232853.GA11108@axis.com> <20180307.103226.1538176953286317879.davem@davemloft.net> <20180307172157.GA22658@axis.com> <20180307.124249.619165601144161535.davem@davemloft.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AbQceqfdZEv+FvjW" Content-Disposition: inline In-Reply-To: <20180307.124249.619165601144161535.davem@davemloft.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AbQceqfdZEv+FvjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2018-03-07 12:42:49, David Miller wrote: > From: Niklas Cassel > Date: Wed, 7 Mar 2018 18:21:57 +0100 >=20 > > Considering this, you can drop/revert: > > 95eb930a40a0 ("net: stmmac: use correct barrier between coherent memory= and MMIO") > > or perhaps you want me to send a revert? >=20 > You must submit explicit patches to do a revert or any other change. >=20 > > After reverting 95eb930a40a0, we will still have a dma_wmb() _after_ the > > last descriptor word write. You just explained that nothing else is nee= ded > > after the last descriptor word write, so I actually think that this last > > barrier is superfluous. >=20 > You don't need one after the last descriptor write. >=20 > Look, you're only concerned with ordering within the descriptor writes. >=20 > So it's only about: >=20 > desc->a =3D x; >=20 > /* Write to 'a' must be visible to the hardware before 'b'. */ > dma_wmb(); > desc->b =3D y; >=20 > writel(); >=20 > That's all that you need. We may need to fix the docs then, there's wmb() there in the docs: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Doc= umentation/memory-barriers.txt?h=3Dv4.16-rc1#n1913 Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --AbQceqfdZEv+FvjW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlqg/N8ACgkQMOfwapXb+vKVYgCcC9jgkgNNZdHJAIhNsCEX+cDK nIIAni/VG67i1B7SWYi0sP9CkIPZw09T =lWoN -----END PGP SIGNATURE----- --AbQceqfdZEv+FvjW--