]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/x86/include/asm/io_32.h
x86: Clean up mem*io functions.
[net-next-2.6.git] / arch / x86 / include / asm / io_32.h
index a299900f5920898977a4b0935382a898f673082e..685e332934685398ea4b7ceeb6ec4a9cf7314fb3 100644 (file)
@@ -37,9 +37,6 @@
   *  - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
   */
 
-#define XQUAD_PORTIO_BASE 0xfe400000
-#define XQUAD_PORTIO_QUAD 0x40000  /* 256k per quad. */
-
 #ifdef __KERNEL__
 
 #include <asm-generic/iomap.h>
 #define xlate_dev_kmem_ptr(p)  p
 
 static inline void
-memset_io(volatile void __iomem *addr, unsigned char val, int count)
+memset_io(volatile void __iomem *addr, unsigned char val, size_t count)
 {
        memset((void __force *)addr, val, count);
 }
 
 static inline void
-memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
+memcpy_fromio(void *dst, const volatile void __iomem *src, size_t count)
 {
-       __memcpy(dst, (const void __force *)src, count);
+       memcpy(dst, (const void __force *)src, count);
 }
 
 static inline void
-memcpy_toio(volatile void __iomem *dst, const void *src, int count)
+memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
 {
-       __memcpy((void __force *)dst, src, count);
+       memcpy((void __force *)dst, src, count);
 }
 
 /*
@@ -123,47 +120,21 @@ static inline void slow_down_io(void)
 
 #endif
 
-#define __BUILDIO(bwl, bw, type)                               \
-static inline void out##bwl(unsigned type value, int port)     \
-{                                                              \
-       out##bwl##_local(value, port);                          \
-}                                                              \
-                                                               \
-static inline unsigned type in##bwl(int port)                  \
-{                                                              \
-       return in##bwl##_local(port);                           \
-}
-
 #define BUILDIO(bwl, bw, type)                                         \
-static inline void out##bwl##_local(unsigned type value, int port)     \
+static inline void out##bwl(unsigned type value, int port)             \
 {                                                                      \
-       asm volatile("out" #bwl " %" #bw "0, %w1"               \
+       asm volatile("out" #bwl " %" #bw "0, %w1"                       \
                     : : "a"(value), "Nd"(port));                       \
 }                                                                      \
                                                                        \
-static inline unsigned type in##bwl##_local(int port)                  \
+static inline unsigned type in##bwl(int port)                          \
 {                                                                      \
        unsigned type value;                                            \
-       asm volatile("in" #bwl " %w1, %" #bw "0"                \
+       asm volatile("in" #bwl " %w1, %" #bw "0"                        \
                     : "=a"(value) : "Nd"(port));                       \
        return value;                                                   \
 }                                                                      \
                                                                        \
-static inline void out##bwl##_local_p(unsigned type value, int port)   \
-{                                                                      \
-       out##bwl##_local(value, port);                                  \
-       slow_down_io();                                                 \
-}                                                                      \
-                                                                       \
-static inline unsigned type in##bwl##_local_p(int port)                        \
-{                                                                      \
-       unsigned type value = in##bwl##_local(port);                    \
-       slow_down_io();                                                 \
-       return value;                                                   \
-}                                                                      \
-                                                                       \
-__BUILDIO(bwl, bw, type)                                               \
-                                                                       \
 static inline void out##bwl##_p(unsigned type value, int port)         \
 {                                                                      \
        out##bwl(value, port);                                          \