From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs Date: Fri, 23 Mar 2018 12:43:26 -0400 (EDT) Message-ID: <20180323.124326.2170503491903886041.davem@davemloft.net> References: <1521738603-23596-4-git-send-email-okaya@codeaurora.org> <20180323.122035.1380806748695640531.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ariel.elior@cavium.com, everest-linux-l2@cavium.com, linux-kernel@vger.kernel.org To: okaya@codeaurora.org Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Sinan Kaya Date: Fri, 23 Mar 2018 12:31:12 -0400 > Sorry, you got me confused now. > > If you look at the code closer, you'll see this. > > wmb(); > > txdata->tx_db.data.prod += nbd; > barrier(); > > DOORBELL(bp, txdata->cid, txdata->tx_db.raw); > > and you also asked me to rename DOORBELL to DOORBELL_RELAXED() to make > it obvious that we have a relaxed operator inside the macro. This still doesn't match the stated pattern. wmb(); /* no other memory or I/O or IOMEM operation */ writel(); There is a write to a producer index there and then no non-compiler barrier or any kind before the writel(). So, in fact, it might really need that implicit writel() barrier here!