netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: akpm@linux-foundation.org
Cc: mingo@elte.hu, netdev@vger.kernel.org
Subject: Re: drivers/net/enic/vnic_cq.c
Date: Thu, 09 Oct 2008 22:14:26 -0700 (PDT)	[thread overview]
Message-ID: <20081009.221426.120533568.davem@davemloft.net> (raw)
In-Reply-To: <20081009.220513.181546765.davem@davemloft.net>


I just pushed the following into net-next-2.6:

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>
---
 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 2dcffd3..b9dc182 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,
-- 
1.5.6.5


  reply	other threads:[~2008-10-10  5:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10  4:12 drivers/net/enic/vnic_cq.c Andrew Morton
2008-10-10  4:15 ` drivers/net/enic/vnic_cq.c David Miller
2008-10-10  4:27   ` drivers/net/enic/vnic_cq.c Andrew Morton
2008-10-10  4:54     ` drivers/net/enic/vnic_cq.c David Miller
2008-10-10  5:05       ` drivers/net/enic/vnic_cq.c David Miller
2008-10-10  5:14         ` David Miller [this message]
2008-10-10 17:10           ` drivers/net/enic/vnic_cq.c Roland Dreier
2008-10-10 18:29             ` drivers/net/enic/vnic_cq.c Scott Feldman
2008-10-10 18:58               ` drivers/net/enic/vnic_cq.c David Miller
2008-10-10 22:34                 ` drivers/net/enic/vnic_cq.c Scott Feldman
2008-10-10  5:16       ` drivers/net/enic/vnic_cq.c Andrew Morton
2008-10-10  5:25         ` drivers/net/enic/vnic_cq.c David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081009.221426.120533568.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).