Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400743

[PATCH 1/2] net: pxa168_eth: use {readl|writel}_relaxed instead of readl/writel

From Jisheng Zhang <jszhang@marvell.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] net: pxa168_eth: use {readl|writel}_relaxed instead of readl/writel
Date 2016-05-13 14:10 +0200
Message-ID <ryk4O-2Yo-15@gated-at.bofh.it> (permalink)
References <ryk4N-2Yo-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Since appropriate memory barriers are already there, use the relaxed
version to improve performance a bit.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 drivers/net/ethernet/marvell/pxa168_eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index c442f6a..db774e3 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -286,12 +286,12 @@ static int pxa168_eth_stop(struct net_device *dev);
 
 static inline u32 rdl(struct pxa168_eth_private *pep, int offset)
 {
-	return readl(pep->base + offset);
+	return readl_relaxed(pep->base + offset);
 }
 
 static inline void wrl(struct pxa168_eth_private *pep, int offset, u32 data)
 {
-	writel(data, pep->base + offset);
+	writel_relaxed(data, pep->base + offset);
 }
 
 static void abort_dma(struct pxa168_eth_private *pep)
-- 
2.8.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] net: pxa168_eth: improve performance Jisheng Zhang <jszhang@marvell.com> - 2016-05-13 14:10 +0200
  [PATCH 1/2] net: pxa168_eth: use {readl|writel}_relaxed instead of readl/writel Jisheng Zhang <jszhang@marvell.com> - 2016-05-13 14:10 +0200
  [PATCH 2/2] net: pxa168_eth: Use dma_wmb/rmb where appropriate Jisheng Zhang <jszhang@marvell.com> - 2016-05-13 14:10 +0200
  Re: [PATCH 0/2] net: pxa168_eth: improve performance David Miller <davem@davemloft.net> - 2016-05-16 19:50 +0200

csiph-web