Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jacob Moroni and committed by
Leon Romanovsky
52f3d34c 88f2bf22

-5
-2
drivers/infiniband/hw/irdma/ctrl.c
··· 3887 3887 set_64bit_val(ccq->cq_uk.shadow_area, 32, temp_val); 3888 3888 spin_unlock_irqrestore(&ccq->dev->cqp_lock, flags); 3889 3889 3890 - dma_wmb(); /* make sure shadow area is updated before arming */ 3891 - 3892 3890 writel(ccq->cq_uk.cq_id, ccq->dev->cq_arm_db); 3893 3891 } 3894 3892
-3
drivers/infiniband/hw/irdma/uk.c
··· 114 114 */ 115 115 void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp) 116 116 { 117 - dma_wmb(); 118 117 writel(qp->qp_id, qp->wqe_alloc_db); 119 118 } 120 119 ··· 1105 1106 FIELD_PREP(IRDMA_CQ_DBSA_ARM_NEXT, arm_next); 1106 1107 1107 1108 set_64bit_val(cq->shadow_area, 32, temp_val); 1108 - 1109 - dma_wmb(); /* make sure WQE is populated before valid bit is set */ 1110 1109 1111 1110 writel(cq->cq_id, cq->cqe_alloc_db); 1112 1111 }