patch-2.4.0-test6 linux/include/asm-ppc/page.h

Next file: linux/include/asm-ppc/pgtable.h
Previous file: linux/include/asm-ppc/hardirq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test5/linux/include/asm-ppc/page.h linux/include/asm-ppc/page.h
@@ -114,8 +114,9 @@
 #define __pa(x) ___pa ((unsigned long)(x))
 #define __va(x) ___va ((unsigned long)(x))
 
-#define MAP_NR(addr)		(((unsigned long)addr-PAGE_OFFSET) >> PAGE_SHIFT)
 #define MAP_PAGE_RESERVED	(1<<15)
+#define virt_to_page(kaddr)	(mem_map + (((unsigned long)kaddr-PAGE_OFFSET) >> PAGE_SHIFT))
+#define VALID_PAGE(page)	((page - mem_map) < max_mapnr)
 
 extern unsigned long get_zero_page_fast(void);
 

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