summaryrefslogtreecommitdiffstats
path: root/include/asm-i386/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/io.h')
-rw-r--r--include/asm-i386/io.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h
index 93fd0c1b5..906fca475 100644
--- a/include/asm-i386/io.h
+++ b/include/asm-i386/io.h
@@ -27,6 +27,7 @@
/*
* Bit simplified and optimized by Jan Hubicka
+ * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999.
*/
#ifdef SLOW_IO_BY_JUMPING
@@ -98,6 +99,7 @@ __OUTS(l)
#ifdef __KERNEL__
+#include <linux/config.h>
#include <linux/vmalloc.h>
#include <asm/page.h>
@@ -109,12 +111,20 @@ __OUTS(l)
*/
extern inline unsigned long virt_to_phys(volatile void * address)
{
+#ifdef CONFIG_BIGMEM
+ return __pa(address);
+#else
return __io_phys(address);
+#endif
}
extern inline void * phys_to_virt(unsigned long address)
{
+#ifdef CONFIG_BIGMEM
+ return __va(address);
+#else
return __io_virt(address);
+#endif
}
extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
@@ -152,10 +162,16 @@ extern void iounmap(void *addr);
#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
#define readw(addr) (*(volatile unsigned short *) __io_virt(addr))
#define readl(addr) (*(volatile unsigned int *) __io_virt(addr))
+#define __raw_readb readb
+#define __raw_readw readw
+#define __raw_readl readl
#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b))
#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b))
+#define __raw_writeb writeb
+#define __raw_writew writew
+#define __raw_writel writel
#define memset_io(a,b,c) memset(__io_virt(a),(b),(c))
#define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c))