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>
Este commit está contenido en:
@@ -8365,7 +8365,6 @@ static inline void clear_recv_intr(struct hfi1_ctxtdata *rcd)
|
||||
struct hfi1_devdata *dd = rcd->dd;
|
||||
u32 addr = CCE_INT_CLEAR + (8 * rcd->ireg);
|
||||
|
||||
mmiowb();
|
||||
write_csr(dd, addr, rcd->imask);
|
||||
/* force the above write on the chip and get a value back */
|
||||
(void)read_csr(dd, addr);
|
||||
@@ -11803,12 +11802,10 @@ void update_usrhead(struct hfi1_ctxtdata *rcd, u32 hd, u32 updegr, u32 egrhd,
|
||||
<< RCV_EGR_INDEX_HEAD_HEAD_SHIFT;
|
||||
write_uctxt_csr(dd, ctxt, RCV_EGR_INDEX_HEAD, reg);
|
||||
}
|
||||
mmiowb();
|
||||
reg = ((u64)rcv_intr_count << RCV_HDR_HEAD_COUNTER_SHIFT) |
|
||||
(((u64)hd & RCV_HDR_HEAD_HEAD_MASK)
|
||||
<< RCV_HDR_HEAD_HEAD_SHIFT);
|
||||
write_uctxt_csr(dd, ctxt, RCV_HDR_HEAD, reg);
|
||||
mmiowb();
|
||||
}
|
||||
|
||||
u32 hdrqempty(struct hfi1_ctxtdata *rcd)
|
||||
|
@@ -1578,7 +1578,6 @@ void hfi1_sc_wantpiobuf_intr(struct send_context *sc, u32 needint)
|
||||
sc_del_credit_return_intr(sc);
|
||||
trace_hfi1_wantpiointr(sc, needint, sc->credit_ctrl);
|
||||
if (needint) {
|
||||
mmiowb();
|
||||
sc_return_credits(sc);
|
||||
}
|
||||
}
|
||||
|
Referencia en una nueva incidencia
Block a user