[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180323.130418.2223623186761161723.davem@davemloft.net>
Date: Fri, 23 Mar 2018 13:04:18 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: okaya@...eaurora.org
Cc: netdev@...r.kernel.org, timur@...eaurora.org,
sulrich@...eaurora.org, linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, ariel.elior@...ium.com,
everest-linux-l2@...ium.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on
weakly-ordered archs
From: Sinan Kaya <okaya@...eaurora.org>
Date: Fri, 23 Mar 2018 12:51:47 -0400
> It could if txdata->tx_db was not a union. There is a data dependency
> between txdata->tx_db.data.prod and txdata->tx_db.raw.
>
> So, no reordering.
I don't see it that way, the code requires that:
txdata->tx_db.data.prod += nbd;
is visible before the doorbell update.
barrier() doesn't provide that.
Neither does writel_relaxed(). However plain writel() does.
Therefore the code is only correct as-is, and your change potentially
adds a reordering problem.
Powered by blists - more mailing lists