linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h
@ 2018-09-14 10:33 Corentin Labbe
  2018-09-14 10:33 ` [PATCH 1/2] net: neterion: vxge: " Corentin Labbe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Corentin Labbe @ 2018-09-14 10:33 UTC (permalink / raw)
  To: davem, jdmason; +Cc: linux-kernel, netdev, Corentin Labbe

Hello

This serie remove usage of custom writeq/readq in favor of ones defined in linux/io-64-nonatomic-lo-hi.h

This serie is only compile tested.

Regards

Corentin Labbe (2):
  net: neterion: vxge: use linux/io-64-nonatomic-lo-hi.h
  net: neterion: s2io: Use linux/io-64-nonatomic-lo-hi.h

 drivers/net/ethernet/neterion/s2io.c              |  1 +
 drivers/net/ethernet/neterion/s2io.h              | 22 +---------------------
 drivers/net/ethernet/neterion/vxge/vxge-config.c  |  1 +
 drivers/net/ethernet/neterion/vxge/vxge-config.h  | 20 --------------------
 drivers/net/ethernet/neterion/vxge/vxge-traffic.c |  1 +
 5 files changed, 4 insertions(+), 41 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] net: neterion: vxge: use linux/io-64-nonatomic-lo-hi.h
  2018-09-14 10:33 [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
@ 2018-09-14 10:33 ` Corentin Labbe
  2018-09-14 10:33 ` [PATCH 2/2] net: neterion: s2io: Use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
  2018-09-14 15:49 ` [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Corentin Labbe @ 2018-09-14 10:33 UTC (permalink / raw)
  To: davem, jdmason; +Cc: linux-kernel, netdev, Corentin Labbe

This patch replace the custom definition of writeq/read and use ones
defined in linux/io-64-nonatomic-lo-hi.h.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/net/ethernet/neterion/vxge/vxge-config.c  |  1 +
 drivers/net/ethernet/neterion/vxge/vxge-config.h  | 20 --------------------
 drivers/net/ethernet/neterion/vxge/vxge-traffic.c |  1 +
 3 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
index 358ed61..2b422c5 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -13,6 +13,7 @@
  ******************************************************************************/
 #include <linux/vmalloc.h>
 #include <linux/etherdevice.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/pci.h>
 #include <linux/pci_hotplug.h>
 #include <linux/slab.h>
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.h b/drivers/net/ethernet/neterion/vxge/vxge-config.h
index d743a37..e678ba3 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.h
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.h
@@ -2011,26 +2011,6 @@ enum vxge_hw_status vxge_hw_vpath_mtu_set(
 void
 vxge_hw_vpath_rx_doorbell_init(struct __vxge_hw_vpath_handle *vp);
 
-#ifndef readq
-static inline u64 readq(void __iomem *addr)
-{
-	u64 ret = 0;
-	ret = readl(addr + 4);
-	ret <<= 32;
-	ret |= readl(addr);
-
-	return ret;
-}
-#endif
-
-#ifndef writeq
-static inline void writeq(u64 val, void __iomem *addr)
-{
-	writel((u32) (val), addr);
-	writel((u32) (val >> 32), (addr + 4));
-}
-#endif
-
 static inline void __vxge_hw_pio_mem_write32_upper(u32 val, void __iomem *addr)
 {
 	writel(val, addr + 4);
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c b/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
index 0c3b5de..30e5cdc 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
@@ -12,6 +12,7 @@
  * Copyright(c) 2002-2010 Exar Corp.
  ******************************************************************************/
 #include <linux/etherdevice.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/prefetch.h>
 
 #include "vxge-traffic.h"
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] net: neterion: s2io: Use linux/io-64-nonatomic-lo-hi.h
  2018-09-14 10:33 [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
  2018-09-14 10:33 ` [PATCH 1/2] net: neterion: vxge: " Corentin Labbe
@ 2018-09-14 10:33 ` Corentin Labbe
  2018-09-14 15:49 ` [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Corentin Labbe @ 2018-09-14 10:33 UTC (permalink / raw)
  To: davem, jdmason; +Cc: linux-kernel, netdev, Corentin Labbe

This patch replace the custom definition of writeq/read and use ones
defined in linux/io-64-nonatomic-lo-hi.h.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/net/ethernet/neterion/s2io.c |  1 +
 drivers/net/ethernet/neterion/s2io.h | 22 +---------------------
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index b8983e7..44acc63 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -75,6 +75,7 @@
 #include <linux/tcp.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/slab.h>
 #include <linux/prefetch.h>
 #include <net/tcp.h>
diff --git a/drivers/net/ethernet/neterion/s2io.h b/drivers/net/ethernet/neterion/s2io.h
index 1a24a72..0a921f3 100644
--- a/drivers/net/ethernet/neterion/s2io.h
+++ b/drivers/net/ethernet/neterion/s2io.h
@@ -10,6 +10,7 @@
  * system is licensed under the GPL.
  * See the file COPYING in this distribution for more information.
  ************************************************************************/
+#include <linux/io-64-nonatomic-lo-hi.h>
 #ifndef _S2IO_H
 #define _S2IO_H
 
@@ -970,27 +971,6 @@ struct s2io_nic {
 #define RESET_ERROR 1
 #define CMD_ERROR   2
 
-/*  OS related system calls */
-#ifndef readq
-static inline u64 readq(void __iomem *addr)
-{
-	u64 ret = 0;
-	ret = readl(addr + 4);
-	ret <<= 32;
-	ret |= readl(addr);
-
-	return ret;
-}
-#endif
-
-#ifndef writeq
-static inline void writeq(u64 val, void __iomem *addr)
-{
-	writel((u32) (val), addr);
-	writel((u32) (val >> 32), (addr + 4));
-}
-#endif
-
 /*
  * Some registers have to be written in a particular order to
  * expect correct hardware operation. The macro SPECIAL_REG_WRITE
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h
  2018-09-14 10:33 [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
  2018-09-14 10:33 ` [PATCH 1/2] net: neterion: vxge: " Corentin Labbe
  2018-09-14 10:33 ` [PATCH 2/2] net: neterion: s2io: Use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
@ 2018-09-14 15:49 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-09-14 15:49 UTC (permalink / raw)
  To: clabbe; +Cc: jdmason, linux-kernel, netdev

From: Corentin Labbe <clabbe@baylibre.com>
Date: Fri, 14 Sep 2018 10:33:08 +0000

> This serie remove usage of custom writeq/readq in favor of ones
> defined in linux/io-64-nonatomic-lo-hi.h
> 
> This serie is only compile tested.

The vxge patch doesn't even apply cleanly to net-next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-14 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14 10:33 [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
2018-09-14 10:33 ` [PATCH 1/2] net: neterion: vxge: " Corentin Labbe
2018-09-14 10:33 ` [PATCH 2/2] net: neterion: s2io: Use linux/io-64-nonatomic-lo-hi.h Corentin Labbe
2018-09-14 15:49 ` [PATCH 0/2] net: ethernet: neterion: use linux/io-64-nonatomic-lo-hi.h David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).