These are needed for the HPET driver and, apparently, other things.

The patch also removes the private implementation from s2io.h, so arch
implementations of readq() and writeq() now become compulsory.


---

 25-akpm/drivers/net/s2io.h    |   21 ---------------------
 25-akpm/include/asm-i386/io.h |   15 +++++++++++++++
 2 files changed, 15 insertions(+), 21 deletions(-)

diff -puN include/asm-i386/io.h~add-i386-readq include/asm-i386/io.h
--- 25/include/asm-i386/io.h~add-i386-readq	2004-05-17 18:04:38.148928008 -0700
+++ 25-akpm/include/asm-i386/io.h	2004-05-17 18:04:38.151927552 -0700
@@ -364,4 +364,19 @@ BUILDIO(b,b,char)
 BUILDIO(w,w,short)
 BUILDIO(l,,int)
 
+static inline u64 readq(void *addr)
+{
+	return readl(addr) | (((u64)readl(addr + 4)) << 32);
+}
+
+static inline void writeq(u64 v, void *addr)
+{
+	u32 v32;
+
+	v32 = v;
+	writel(v32, addr);
+	v32 = v >> 32;
+	writel(v32, addr + 4);
+}
+
 #endif
diff -puN drivers/net/s2io.h~add-i386-readq drivers/net/s2io.h
--- 25/drivers/net/s2io.h~add-i386-readq	2004-05-17 18:43:58.320127448 -0700
+++ 25-akpm/drivers/net/s2io.h	2004-05-17 18:43:58.322127144 -0700
@@ -748,27 +748,6 @@ typedef struct s2io_nic {
 #define SMALL_RXD_CNT	40 * (MAX_RXDS_PER_BLOCK+1)
 #define LARGE_RXD_CNT	100 * (MAX_RXDS_PER_BLOCK+1)
 
-/*  OS related system calls */
-#ifndef readq
-static inline u64 readq(void *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 *addr)
-{
-	writel((u32) (val), addr);
-	writel((u32) (val >> 32), (addr + 4));
-}
-#endif
-
 /*  Interrupt related values of Xena */
 
 #define ENABLE_INTRS    1

_