diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2006-03-27 04:15:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:45 -0500 |
commit | 5cdac7ca1b727184b1af21effaffcb9e2cd535c2 (patch) | |
tree | 4b148f7b09809f377cb896b24648f978cddf63bb /include/asm-frv/page.h | |
parent | bb872f787a9b6a40a4aa206175e768137f595d9c (diff) |
[PATCH] unify pfn_to_page: FRV pfn_to_page
FRV can use generic funcs.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-frv/page.h')
-rw-r--r-- | include/asm-frv/page.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index b8221b611b5c..dc0f7e08a4c2 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h | |||
@@ -57,13 +57,9 @@ extern unsigned long min_low_pfn; | |||
57 | extern unsigned long max_pfn; | 57 | extern unsigned long max_pfn; |
58 | 58 | ||
59 | #ifdef CONFIG_MMU | 59 | #ifdef CONFIG_MMU |
60 | #define pfn_to_page(pfn) (mem_map + (pfn)) | ||
61 | #define page_to_pfn(page) ((unsigned long) ((page) - mem_map)) | ||
62 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 60 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
63 | |||
64 | #else | 61 | #else |
65 | #define pfn_to_page(pfn) (&mem_map[(pfn) - (PAGE_OFFSET >> PAGE_SHIFT)]) | 62 | #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) |
66 | #define page_to_pfn(page) ((PAGE_OFFSET >> PAGE_SHIFT) + (unsigned long) ((page) - mem_map)) | ||
67 | #define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) | 63 | #define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) |
68 | 64 | ||
69 | #endif | 65 | #endif |
@@ -87,6 +83,7 @@ extern unsigned long max_pfn; | |||
87 | #define WANT_PAGE_VIRTUAL 1 | 83 | #define WANT_PAGE_VIRTUAL 1 |
88 | #endif | 84 | #endif |
89 | 85 | ||
86 | #include <asm-generic/memory_model.h> | ||
90 | #include <asm-generic/page.h> | 87 | #include <asm-generic/page.h> |
91 | 88 | ||
92 | #endif /* _ASM_PAGE_H */ | 89 | #endif /* _ASM_PAGE_H */ |