diff options
author | Sinan Kaya <okaya@codeaurora.org> | 2018-03-20 05:47:44 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-03-21 22:51:41 +0300 |
commit | 97d82a48d7a7eca6f20b100ae19811134509406e (patch) | |
tree | c748fec9d12b873df810c1cf787bdc94b625c7d3 /drivers/infiniband/hw/mlx4 | |
parent | 185899ee8d00460a305e07ed2df178dbf7455227 (diff) | |
download | linux-97d82a48d7a7eca6f20b100ae19811134509406e.tar.xz |
IB/mlx4: Eliminate duplicate barriers on weakly-ordered archs
Code includes wmb() followed by writel(). writel() already has a barrier on
some architectures like arm64.
This ends up CPU observing two barriers back to back before executing the
register write.
Since code already has an explicit barrier call, changing writel() to
writel_relaxed().
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 04efc05fb531..523028e944ed 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -3894,8 +3894,8 @@ out: */ wmb(); - writel(qp->doorbell_qpn, - to_mdev(ibqp->device)->uar_map + MLX4_SEND_DOORBELL); + writel_relaxed(qp->doorbell_qpn, + to_mdev(ibqp->device)->uar_map + MLX4_SEND_DOORBELL); /* * Make sure doorbells don't leak out of SQ spinlock |