summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh/page.h')
-rw-r--r--include/asm-sh/page.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 1348466a9..dcac85fa6 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -65,7 +65,8 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define PAGE_OFFSET (0x80000000)
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
-#define MAP_NR(addr) ((__pa(addr)-__MEMORY_START) >> PAGE_SHIFT)
+#define virt_to_page(kaddr) (mem_map + ((__pa(kaddr)-__MEMORY_START) >> PAGE_SHIFT))
+#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#ifndef __ASSEMBLY__