Skip to content

Commit

Permalink
enic: Attempt to fix build in 32-bit such as i386.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Oct 10, 2008
1 parent fa3e5b4 commit 55ed31e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/net/enic/vnic_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 55ed31e

Please sign in to comment.