[lkml]   [2018]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs
From: Sinan Kaya <>
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-> and txdata->tx_db.raw.
> So, no reordering.

I don't see it that way, the code requires that:

txdata-> += 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.

 \ /
  Last update: 2018-03-23 18:05    [W:0.057 / U:14.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site