]> git.itanic.dy.fi Git - linux-stable/commit
net: hns3: use writel() to optimize the barrier operation
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 16 Sep 2020 09:33:49 +0000 (17:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Sep 2020 23:14:28 +0000 (16:14 -0700)
commit48ee56fd0b3785481a521fb7daaf1465219fc3af
tree870fcb293c004d899d2f87343d2b23a442eab935
parent8c30e19460e1bb935c788a077cc063fb15f1ef04
net: hns3: use writel() to optimize the barrier operation

writel() can be used to order I/O vs memory by default when
writing portable drivers. Use writel() to replace wmb() +
writel_relaxed(), and writel() is dma_wmb() + writel_relaxed()
for ARM64, so there is an optimization here because dma_wmb()
is a lighter barrier than wmb().

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h