summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSinan Kaya <okaya@codeaurora.org>2018-03-13 23:20:24 -0400
committerJason Gunthorpe <jgg@mellanox.com>2018-03-15 15:35:44 -0600
commit561e5d48968be22fc71af6a0e13af6edae595dbe (patch)
tree7ea473cab206bf1ffbeadcb7de929e1ae58f8eb4 /drivers/infiniband
parent7b48221cf41a90cf4bfc36e6d699b7fa4169c970 (diff)
downloadop-kernel-dev-561e5d48968be22fc71af6a0e13af6edae595dbe.zip
op-kernel-dev-561e5d48968be22fc71af6a0e13af6edae595dbe.tar.gz
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: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/qedr/verbs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 875b172..b61a395 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1870,7 +1870,7 @@ static int qedr_update_qp_state(struct qedr_dev *dev,
if (rdma_protocol_roce(&dev->ibdev, 1)) {
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 */
mmiowb();
}
@@ -3257,7 +3257,7 @@ int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
* redundant doorbell.
*/
wmb();
- writel(qp->sq.db_data.raw, qp->sq.db);
+ writel_relaxed(qp->sq.db_data.raw, qp->sq.db);
/* Make sure write sticks */
mmiowb();
OpenPOWER on IntegriCloud