mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs
Code includes wmb() followed by writel(). 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 code to wmb() writel_relaxed() mmiowb() for multi-arch support. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
14ef85b431
commit
3c95c56732
1 changed files with 3 additions and 2 deletions
|
@ -1858,8 +1858,9 @@ static void ql_update_small_bufq_prod_index(struct ql3_adapter *qdev)
|
|||
qdev->small_buf_release_cnt -= 8;
|
||||
}
|
||||
wmb();
|
||||
writel(qdev->small_buf_q_producer_index,
|
||||
&port_regs->CommonRegs.rxSmallQProducerIndex);
|
||||
writel_relaxed(qdev->small_buf_q_producer_index,
|
||||
&port_regs->CommonRegs.rxSmallQProducerIndex);
|
||||
mmiowb();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue