summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-alpha/page.h')
-rw-r--r--include/asm-alpha/page.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h
index 62a72144f..41afdcbd8 100644
--- a/include/asm-alpha/page.h
+++ b/include/asm-alpha/page.h
@@ -140,7 +140,8 @@ extern __inline__ int get_order(unsigned long size)
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
-#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
+#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
+#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#endif /* __KERNEL__ */