diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2006-03-27 04:15:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:47 -0500 |
commit | a0140c1d85637ee5f4ea7c78f066e3611a6a79dc (patch) | |
tree | 7a52892e57ff7a97a3aabf920891b68ca8bf578a /include/asm-generic | |
parent | 0ecd702bcb924d5fb7f687e09986f688336ac896 (diff) |
[PATCH] remove zone_mem_map
This patch removes zone_mem_map.
pfn_to_page uses pgdat, page_to_pfn uses zone. page_to_pfn can use pgdat
instead of zone, which is only one user of zone_mem_map. By modifing it,
we can remove zone_mem_map.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/memory_model.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index a7bb4978e808..0cfb086dd373 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h | |||
@@ -45,11 +45,11 @@ extern unsigned long page_to_pfn(struct page *page); | |||
45 | NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\ | 45 | NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\ |
46 | }) | 46 | }) |
47 | 47 | ||
48 | #define page_to_pfn(pg) \ | 48 | #define page_to_pfn(pg) \ |
49 | ({ struct page *__pg = (pg); \ | 49 | ({ struct page *__pg = (pg); \ |
50 | struct zone *__zone = page_zone(__pg); \ | 50 | struct pglist_data *__pgdat = NODE_DATA(page_to_nid(__pg)); \ |
51 | (unsigned long)(__pg - __zone->zone_mem_map) + \ | 51 | (unsigned long)(__pg - __pgdat->node_mem_map) + \ |
52 | __zone->zone_start_pfn; \ | 52 | __pgdat->node_start_pfn; \ |
53 | }) | 53 | }) |
54 | 54 | ||
55 | #elif defined(CONFIG_SPARSEMEM) | 55 | #elif defined(CONFIG_SPARSEMEM) |