aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_iba6120.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2019-02-22 12:14:59 -0500
committerWill Deacon <will.deacon@arm.com>2019-04-08 07:01:02 -0400
commitfb24ea52f78e0d595852e09e3a55697c8f442189 (patch)
tree00ca29c7b0b8df6258a1ad1faf34f6e838ada26c /drivers/infiniband/hw/qib/qib_iba6120.c
parent949b8c72768e3a7c69d270962b8a142ee8deec1b (diff)
drivers: Remove explicit invocations of mmiowb()
mmiowb() is now implied by spin_unlock() on architectures that require it, so there is no reason to call it from driver code. This patch was generated using coccinelle: @mmiowb@ @@ - mmiowb(); and invoked as: $ for d in drivers include/linux/qed sound; do \ spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation. If you've ended up bisecting to this commit, you can reintroduce the mmiowb() calls using wmb() instead, which should restore the old behaviour on all architectures other than some esoteric ia64 systems. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_iba6120.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_iba6120.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
index cdbf707fa267..531d8a1db2c3 100644
--- a/drivers/infiniband/hw/qib/qib_iba6120.c
+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
@@ -1884,7 +1884,6 @@ static void qib_6120_put_tid(struct qib_devdata *dd, u64 __iomem *tidptr,
1884 qib_write_kreg(dd, kr_scratch, 0xfeeddeaf); 1884 qib_write_kreg(dd, kr_scratch, 0xfeeddeaf);
1885 writel(pa, tidp32); 1885 writel(pa, tidp32);
1886 qib_write_kreg(dd, kr_scratch, 0xdeadbeef); 1886 qib_write_kreg(dd, kr_scratch, 0xdeadbeef);
1887 mmiowb();
1888 spin_unlock_irqrestore(tidlockp, flags); 1887 spin_unlock_irqrestore(tidlockp, flags);
1889} 1888}
1890 1889
@@ -1928,7 +1927,6 @@ static void qib_6120_put_tid_2(struct qib_devdata *dd, u64 __iomem *tidptr,
1928 pa |= 2 << 29; 1927 pa |= 2 << 29;
1929 } 1928 }
1930 writel(pa, tidp32); 1929 writel(pa, tidp32);
1931 mmiowb();
1932} 1930}
1933 1931
1934 1932
@@ -2053,9 +2051,7 @@ static void qib_update_6120_usrhead(struct qib_ctxtdata *rcd, u64 hd,
2053{ 2051{
2054 if (updegr) 2052 if (updegr)
2055 qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); 2053 qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt);
2056 mmiowb();
2057 qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); 2054 qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt);
2058 mmiowb();
2059} 2055}
2060 2056
2061static u32 qib_6120_hdrqempty(struct qib_ctxtdata *rcd) 2057static u32 qib_6120_hdrqempty(struct qib_ctxtdata *rcd)