patch-2.4.9 linux/include/asm-i386/io.h

Next file: linux/include/asm-i386/keyboard.h
Previous file: linux/include/asm-i386/apicdef.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/include/asm-i386/io.h linux/include/asm-i386/io.h
@@ -135,6 +135,11 @@
 	return __va(address);
 }
 
+/*
+ * Change "struct page" to physical address.
+ */
+#define page_to_phys(page)	((page - mem_map) << PAGE_SHIFT)
+
 extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
 
 static inline void * ioremap (unsigned long offset, unsigned long size)
@@ -159,6 +164,7 @@
  */
 #define virt_to_bus virt_to_phys
 #define bus_to_virt phys_to_virt
+#define page_to_bus page_to_phys
 
 /*
  * readX/writeX() are used to access memory mapped devices. On some

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)