Commit 561e5d48 authored by Sinan Kaya's avatar Sinan Kaya Committed by Jason Gunthorpe

RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs

Code includes wmb() followed by writel() in multiple places. 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: default avatarSinan Kaya <okaya@codeaurora.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 7b48221c
...@@ -1870,7 +1870,7 @@ static int qedr_update_qp_state(struct qedr_dev *dev, ...@@ -1870,7 +1870,7 @@ static int qedr_update_qp_state(struct qedr_dev *dev,
if (rdma_protocol_roce(&dev->ibdev, 1)) { if (rdma_protocol_roce(&dev->ibdev, 1)) {
wmb(); wmb();
writel(qp->rq.db_data.raw, qp->rq.db); writel_relaxed(qp->rq.db_data.raw, qp->rq.db);
/* Make sure write takes effect */ /* Make sure write takes effect */
mmiowb(); mmiowb();
} }
...@@ -3257,7 +3257,7 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -3257,7 +3257,7 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
* redundant doorbell. * redundant doorbell.
*/ */
wmb(); wmb();
writel(qp->sq.db_data.raw, qp->sq.db); writel_relaxed(qp->sq.db_data.raw, qp->sq.db);
/* Make sure write sticks */ /* Make sure write sticks */
mmiowb(); mmiowb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment