[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1521216991-28706-8-git-send-email-okaya@codeaurora.org>
Date: Fri, 16 Mar 2018 12:16:20 -0400
From: Sinan Kaya <okaya@...eaurora.org>
To: netdev@...r.kernel.org, timur@...eaurora.org,
sulrich@...eaurora.org
Cc: linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Sinan Kaya <okaya@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Kees Cook <keescook@...omium.org>,
Johannes Berg <johannes.berg@...el.com>,
Allen Pais <allen.lkml@...il.com>, linux-kernel@...r.kernel.org
Subject: [PATCH v3 07/18] drivers: net: cxgb: 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 writel() to
writel_relaxed().
Signed-off-by: Sinan Kaya <okaya@...eaurora.org>
---
drivers/net/ethernet/chelsio/cxgb/sge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index 30de26e..57891bd6 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -495,7 +495,7 @@ static struct sk_buff *sched_skb(struct sge *sge, struct sk_buff *skb,
static inline void doorbell_pio(struct adapter *adapter, u32 val)
{
wmb();
- writel(val, adapter->regs + A_SG_DOORBELL);
+ writel_relaxed(val, adapter->regs + A_SG_DOORBELL);
}
/*
--
2.7.4
Powered by blists - more mailing lists