Commit 415f704d authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Remove direct mem_map references

This removes all but one direct reference to mem_map for x86-64.  This is
needed on systems where we break the mem_map up and directly indexing into
mem_map to get the page structure doesn't work anymore.
Signed-off-by: default avatarMatt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 46e801e5
...@@ -68,8 +68,8 @@ void show_mem(void) ...@@ -68,8 +68,8 @@ void show_mem(void)
for_each_pgdat(pgdat) { for_each_pgdat(pgdat) {
for (i = 0; i < pgdat->node_spanned_pages; ++i) { for (i = 0; i < pgdat->node_spanned_pages; ++i) {
page = pgdat->node_mem_map + i; page = pfn_to_page(pgdat->node_start_pfn + i);
total++; total++;
if (PageReserved(page)) if (PageReserved(page))
reserved++; reserved++;
else if (PageSwapCache(page)) else if (PageSwapCache(page))
...@@ -437,7 +437,7 @@ void __init mem_init(void) ...@@ -437,7 +437,7 @@ void __init mem_init(void)
/* /*
* Only count reserved RAM pages * Only count reserved RAM pages
*/ */
if (page_is_ram(tmp) && PageReserved(mem_map+tmp)) if (page_is_ram(tmp) && PageReserved(pfn_to_page(tmp)))
reservedpages++; reservedpages++;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment