Skip to content

Commit 52f3d34

Browse files
jakemoronirleon
authored andcommitted
RDMA/irdma: Remove redundant dma_wmb() before writel()
A dma_wmb() is not necessary before a writel() because writel() already has an even stronger store barrier. A dma_wmb() is only required to order writes to consistent/DMA memory whereas the barrier in writel() is specified to order writes to DMA memory as well as MMIO. Signed-off-by: Jacob Moroni <jmoroni@google.com> Link: https://patch.msgid.link/20260103172517.2088895-1-jmoroni@google.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 88f2bf2 commit 52f3d34

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/infiniband/hw/irdma/ctrl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3887,8 +3887,6 @@ void irdma_sc_ccq_arm(struct irdma_sc_cq *ccq)
38873887
set_64bit_val(ccq->cq_uk.shadow_area, 32, temp_val);
38883888
spin_unlock_irqrestore(&ccq->dev->cqp_lock, flags);
38893889

3890-
dma_wmb(); /* make sure shadow area is updated before arming */
3891-
38923890
writel(ccq->cq_uk.cq_id, ccq->dev->cq_arm_db);
38933891
}
38943892

drivers/infiniband/hw/irdma/uk.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ void irdma_clr_wqes(struct irdma_qp_uk *qp, u32 qp_wqe_idx)
114114
*/
115115
void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp)
116116
{
117-
dma_wmb();
118117
writel(qp->qp_id, qp->wqe_alloc_db);
119118
}
120119

@@ -1107,8 +1106,6 @@ void irdma_uk_cq_request_notification(struct irdma_cq_uk *cq,
11071106

11081107
set_64bit_val(cq->shadow_area, 32, temp_val);
11091108

1110-
dma_wmb(); /* make sure WQE is populated before valid bit is set */
1111-
11121109
writel(cq->cq_id, cq->cqe_alloc_db);
11131110
}
11141111

0 commit comments

Comments
 (0)