Re: [patch] remove direct mem_map refs for x86-64

From: Matt Tolentino
Date: Wed Nov 03 2004 - 12:05:16 EST


>From SRS0+fff01e338c482ba0c24b+437+infradead.org+arjan@xxxxxxxxxxxxxxxxxxxxxxxx Wed Nov 3 08:54:21 2004
>On Wed, 2004-11-03 at 08:47 -0800, Matt Tolentino wrote:
>> - page = pgdat->node_mem_map + i;
>> - total++;
>> + page = pfn_to_page(pgdat->node_start_pfn + i);
>> + total++;
>
>this can't be correct... pfn_to_page starts to count from address 0
>while the original code starts from the start of the node..

Yep, you're right. I've been thinking about single nodes too much
lately.

matt


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:50:01.939974040 -0500
+++ linux-2.6.10-rc1-mm2/arch/x86_64/mm/init.c 2004-11-03 07:26:15.922478464 -0500
@@ -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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/