net: neterion: vxge: Use linux/io-64-nonatomic-lo-hi.h
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 18 Sep 2018 07:33:14 +0000 (07:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2018 03:06:23 +0000 (20:06 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/vxge/vxge-config.c
drivers/net/ethernet/neterion/vxge/vxge-config.h
drivers/net/ethernet/neterion/vxge/vxge-traffic.c

index 398011c87643c7f15a1da8fc2c72175213c006b0..4c1fb7e578889ac5ea755890e7ff4662259a157d 100644 (file)
@@ -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/slab.h>
 
index d743a37a3cee8db94501ebe27bce03612df23be1..e678ba379598ee6c8d869799c8d01e1e4e8d0d57 100644 (file)
@@ -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);
index 0c3b5dea2858a90665c4a9b5e01432a351150a39..30e5cdc52eb693e85af7cf5ec1163dfe2226d815 100644 (file)
@@ -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"