From: Matt Tolentino <metolent@snoqualmie.dp.intel.com>
To: ak@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [patch] remove direct mem_map refs for x86-64
Date: Wed, 3 Nov 2004 08:47:48 -0800 [thread overview]
Message-ID: <200411031647.iA3GlmBm016951@snoqualmie.dp.intel.com> (raw)
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
next reply other threads:[~2004-11-03 16:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 16:47 Matt Tolentino [this message]
2004-11-03 16:32 ` Arjan van de Ven
2004-11-03 17:02 ` Andi Kleen
2004-11-03 17:09 ` Arjan van de Ven
2004-11-03 17:01 ` Andi Kleen
2004-11-03 17:24 Matt Tolentino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411031647.iA3GlmBm016951@snoqualmie.dp.intel.com \
--to=metolent@snoqualmie.dp.intel.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®