diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-10 01:13:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-10 01:13:53 -0400 |
commit | 55ed31e62d18094337319b942b38cfc00360444b (patch) | |
tree | 7aad51a1c3d4d62cd2546091f10e3dfcf95f90e1 /drivers/net/enic/vnic_dev.h | |
parent | fa3e5b4eb8261ae6ee27922881093db973e9d640 (diff) |
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/vnic_dev.h')
-rw-r--r-- | drivers/net/enic/vnic_dev.h | 14 |
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 @@ | |||
27 | #define VNIC_PADDR_TARGET 0x0000000000000000ULL | 27 | #define VNIC_PADDR_TARGET 0x0000000000000000ULL |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #ifndef readq | ||
31 | static inline u64 readq(void __iomem *reg) | ||
32 | { | ||
33 | return (((u64)readl(reg + 0x4UL) << 32) | | ||
34 | (u64)readl(reg)); | ||
35 | } | ||
36 | |||
37 | static inline void writeq(u64 val, void __iomem *reg) | ||
38 | { | ||
39 | writel(val & 0xffffffff, reg); | ||
40 | writel(val >> 32, reg + 0x4UL); | ||
41 | } | ||
42 | #endif | ||
43 | |||
30 | enum vnic_dev_intr_mode { | 44 | enum vnic_dev_intr_mode { |
31 | VNIC_DEV_INTR_MODE_UNKNOWN, | 45 | VNIC_DEV_INTR_MODE_UNKNOWN, |
32 | VNIC_DEV_INTR_MODE_INTX, | 46 | VNIC_DEV_INTR_MODE_INTX, |