summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2006-03-27 01:15:46 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:44:46 -0800
commit104b8deaa5c0144cccfc7d914413ff80c7176af1 (patch)
tree0897001525bd74a00fad02ab57f0bcd120ed3afc
parentaed630434c4fc0bca8ed62f6730d44ba00bdf595 (diff)
downloadlinux-104b8deaa5c0144cccfc7d914413ff80c7176af1.tar.gz
linux-104b8deaa5c0144cccfc7d914413ff80c7176af1.tar.bz2
linux-104b8deaa5c0144cccfc7d914413ff80c7176af1.zip
[PATCH] unify pfn_to_page: sh pfn_to_page
sh can use generic funcs. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-sh/page.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 972c3f655b2a..9c89287c3e56 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -105,9 +105,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
/* PFN start number, because of __MEMORY_START */
#define PFN_START (__MEMORY_START >> PAGE_SHIFT)
-
-#define pfn_to_page(pfn) (mem_map + (pfn) - PFN_START)
-#define page_to_pfn(page) ((unsigned long)((page) - mem_map) + PFN_START)
+#define ARCH_PFN_OFFSET (FPN_START)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
#define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
@@ -117,6 +115,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#endif /* __KERNEL__ */
+#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __ASM_SH_PAGE_H */