diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2006-03-27 04:15:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:45 -0500 |
commit | 7126cffe74f0dbcd015aaabab01069f422526535 (patch) | |
tree | 2afae8c0ad021ac99b21b38c79988d5e6a208da1 /include/asm-m32r/mmzone.h | |
parent | dd6cc7631cf2a63b3d6c32619054e017479e72ca (diff) |
[PATCH] unify pfn_to_page: m32r pfn_to_page
m32r can use generic funcs.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-m32r/mmzone.h')
-rw-r--r-- | include/asm-m32r/mmzone.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/asm-m32r/mmzone.h b/include/asm-m32r/mmzone.h index adc7970a77ec..9f3b5accda88 100644 --- a/include/asm-m32r/mmzone.h +++ b/include/asm-m32r/mmzone.h | |||
@@ -21,20 +21,6 @@ extern struct pglist_data *node_data[]; | |||
21 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ | 21 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages - 1; \ |
22 | }) | 22 | }) |
23 | 23 | ||
24 | #define pfn_to_page(pfn) \ | ||
25 | ({ \ | ||
26 | unsigned long __pfn = pfn; \ | ||
27 | int __node = pfn_to_nid(__pfn); \ | ||
28 | &NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \ | ||
29 | }) | ||
30 | |||
31 | #define page_to_pfn(pg) \ | ||
32 | ({ \ | ||
33 | struct page *__page = pg; \ | ||
34 | struct zone *__zone = page_zone(__page); \ | ||
35 | (unsigned long)(__page - __zone->zone_mem_map) \ | ||
36 | + __zone->zone_start_pfn; \ | ||
37 | }) | ||
38 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | 24 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) |
39 | /* | 25 | /* |
40 | * pfn_valid should be made as fast as possible, and the current definition | 26 | * pfn_valid should be made as fast as possible, and the current definition |