summaryrefslogtreecommitdiffstats
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-10 07:13:53 +0200
committerDavid S. Miller <davem@davemloft.net>2008-10-10 07:13:53 +0200
commit55ed31e62d18094337319b942b38cfc00360444b (patch)
tree7aad51a1c3d4d62cd2546091f10e3dfcf95f90e1 /drivers/net/enic
parenttcpv6: fix error with CONFIG_TCP_MD5SIG disabled (diff)
downloadlinux-55ed31e62d18094337319b942b38cfc00360444b.tar.xz
linux-55ed31e62d18094337319b942b38cfc00360444b.zip
enic: Attempt to fix build in 32-bit such as i386.
Such platforms lack readq/writeq but this driver want to call them. Noticed by Andrew Morton. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/vnic_dev.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.h b/drivers/net/enic/vnic_dev.h
index 2dcffd3a24bd..b9dc1821c805 100644
--- a/drivers/net/enic/vnic_dev.h
+++ b/drivers/net/enic/vnic_dev.h
@@ -27,6 +27,20 @@
#define VNIC_PADDR_TARGET 0x0000000000000000ULL
#endif
+#ifndef readq
+static inline u64 readq(void __iomem *reg)
+{
+ return (((u64)readl(reg + 0x4UL) << 32) |
+ (u64)readl(reg));
+}
+
+static inline void writeq(u64 val, void __iomem *reg)
+{
+ writel(val & 0xffffffff, reg);
+ writel(val >> 32, reg + 0x4UL);
+}
+#endif
+
enum vnic_dev_intr_mode {
VNIC_DEV_INTR_MODE_UNKNOWN,
VNIC_DEV_INTR_MODE_INTX,