patch-2.4.21 linux-2.4.21/include/asm-m68k/virtconvert.h

Next file: linux-2.4.21/include/asm-m68k/zorro.h
Previous file: linux-2.4.21/include/asm-m68k/system.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-m68k/virtconvert.h linux-2.4.21/include/asm-m68k/virtconvert.h
@@ -85,5 +85,12 @@
 #define bus_to_virt phys_to_virt
 #endif
 
+/*
+ * Change "struct page" to physical address.
+ */
+
+#define __page_address(page)      (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
+#define page_to_phys(page)       virt_to_phys((void *)__page_address(page))
+
 #endif
 #endif

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