lkml.org 
[lkml]   [2004]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] remove direct mem_map refs for x86-64
Hi Andi,

No real functional change here. Just use the pfn_to_page
macros instead of directly indexing into the mem_map.
Patch is against 2.6.10-rc1-mm2. Please consider...

matt

Signed-off-by: Matt Tolentino <matthew.e.tolentino@intel.com>

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.


diff -urN linux-2.6.10-rc1-mm2-vanilla/arch/x86_64/mm/init.c linux-2.6.10-rc1-mm2/arch/x86_64/mm/init.c
--- linux-2.6.10-rc1-mm2-vanilla/arch/x86_64/mm/init.c 2004-11-03 06:40:21.501214144 -0500
+++ linux-2.6.10-rc1-mm2/arch/x86_64/mm/init.c 2004-11-03 06:20:34.000000000 -0500
@@ -68,8 +68,8 @@

for_each_pgdat(pgdat) {
for (i = 0; i < pgdat->node_spanned_pages; ++i) {
- page = pgdat->node_mem_map + i;
- total++;
+ page = pfn_to_page(pgdat->node_start_pfn + i);
+ total++;
if (PageReserved(page))
reserved++;
else if (PageSwapCache(page))
@@ -466,7 +466,7 @@
/*
* 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++;
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.035 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site