From: Matthew Dobson <colpatch@us.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: LSE Tech <lse-tech@lists.sourceforge.net>, Andrew Morton <akpm@osdl.org>
Subject: [RFC PATCH 5/10] Replace 'numnodes' with 'node_online_map' - m32r
Date: Thu, 23 Dec 2004 14:41:36 -0800 [thread overview]
Message-ID: <1103841695.3945.27.camel@arrakis> (raw)
In-Reply-To: <1103838712.3945.12.camel@arrakis>
5/10 - Replace numnodes with node_online_map for m32r
[mcd@arrakis node_online_map]$ diffstat arch-m32r.patch
kernel/setup.c | 4 +++-
mm/discontig.c | 6 +++---
mm/init.c | 6 +++---
3 files changed, 9 insertions(+), 7 deletions(-)
-Matt
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/m32r/kernel/setup.c linux-2.6.10-rc3-mm1-nom.m32r/arch/m32r/kernel/setup.c
--- linux-2.6.10-rc3-mm1/arch/m32r/kernel/setup.c 2004-12-13 16:23:17.000000000 -0800
+++ linux-2.6.10-rc3-mm1-nom.m32r/arch/m32r/kernel/setup.c 2004-12-15 15:50:49.000000000 -0800
@@ -251,7 +251,9 @@ void __init setup_arch(char **cmdline_p)
#endif
#ifdef CONFIG_DISCONTIGMEM
- numnodes = 2;
+ nodes_clear(node_online_map);
+ node_set_online(0);
+ node_set_online(1);
#endif /* CONFIG_DISCONTIGMEM */
init_mm.start_code = (unsigned long) _text;
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/m32r/mm/discontig.c linux-2.6.10-rc3-mm1-nom.m32r/arch/m32r/mm/discontig.c
--- linux-2.6.10-rc3-mm1/arch/m32r/mm/discontig.c 2004-12-13 16:23:19.000000000 -0800
+++ linux-2.6.10-rc3-mm1-nom.m32r/arch/m32r/mm/discontig.c 2004-12-14 11:57:17.000000000 -0800
@@ -75,7 +75,7 @@ unsigned long __init setup_memory(void)
mem_prof_init();
- for (nid = 0 ; nid < numnodes ; nid++) {
+ for_each_online_node(nid) {
mp = &mem_prof[nid];
NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid];
NODE_DATA(nid)->bdata = &node_bdata[nid];
@@ -135,12 +135,12 @@ unsigned long __init zone_sizes_init(voi
mem_prof_t *mp;
pgdat_list = NULL;
- for (nid = numnodes - 1 ; nid >= 0 ; nid--) {
+ for (nid = num_online_nodes() - 1 ; nid >= 0 ; nid--) {
NODE_DATA(nid)->pgdat_next = pgdat_list;
pgdat_list = NODE_DATA(nid);
}
- for (nid = 0 ; nid < numnodes ; nid++) {
+ for_each_online_node(nid) {
mp = &mem_prof[nid];
for (i = 0 ; i < MAX_NR_ZONES ; i++) {
zones_size[i] = 0;
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/m32r/mm/init.c linux-2.6.10-rc3-mm1-nom.m32r/arch/m32r/mm/init.c
--- linux-2.6.10-rc3-mm1/arch/m32r/mm/init.c 2004-12-13 16:23:19.000000000 -0800
+++ linux-2.6.10-rc3-mm1-nom.m32r/arch/m32r/mm/init.c 2004-12-14 11:57:17.000000000 -0800
@@ -153,7 +153,7 @@ int __init reservedpages_count(void)
int reservedpages, nid, i;
reservedpages = 0;
- for (nid = 0 ; nid < numnodes ; nid++)
+ for_each_online_node(nid)
for (i = 0 ; i < MAX_LOW_PFN(nid) - START_PFN(nid) ; i++)
if (PageReserved(NODE_DATA(nid)->node_mem_map + i))
reservedpages++;
@@ -174,7 +174,7 @@ void __init mem_init(void)
#endif
num_physpages = 0;
- for (nid = 0 ; nid < numnodes ; nid++)
+ for_each_online_node(nid)
num_physpages += MAX_LOW_PFN(nid) - START_PFN(nid) + 1;
num_physpages -= hole_pages;
@@ -193,7 +193,7 @@ void __init mem_init(void)
memset(empty_zero_page, 0, PAGE_SIZE);
/* this will put all low memory onto the freelists */
- for (nid = 0 ; nid < numnodes ; nid++)
+ for_each_online_node(nid)
totalram_pages += free_all_bootmem_node(NODE_DATA(nid));
reservedpages = reservedpages_count() - hole_pages;
next prev parent reply other threads:[~2004-12-23 22:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-23 21:51 [RFC PATCH 0/10] Replace 'numnodes' with 'node_online_map' Matthew Dobson
2004-12-23 22:35 ` [RFC PATCH 1/10] Replace 'numnodes' with 'node_online_map' - alpha Matthew Dobson
2004-12-23 22:37 ` [RFC PATCH 2/10] Replace 'numnodes' with 'node_online_map' - arm Matthew Dobson
2004-12-23 22:39 ` [RFC PATCH 3/10] Replace 'numnodes' with 'node_online_map' - i386 Matthew Dobson
2004-12-23 22:40 ` [RFC PATCH 4/10] Replace 'numnodes' with 'node_online_map' - ia64 Matthew Dobson
2004-12-23 22:41 ` Matthew Dobson [this message]
2004-12-23 22:42 ` [RFC PATCH 6/10] Replace 'numnodes' with 'node_online_map' - mips Matthew Dobson
2004-12-23 22:44 ` [RFC PATCH 7/10] Replace 'numnodes' with 'node_online_map' - parisc Matthew Dobson
2004-12-23 22:45 ` [RFC PATCH 8/10] Replace 'numnodes' with 'node_online_map' - ppc64 Matthew Dobson
2004-12-23 22:46 ` [RFC PATCH 9/10] Replace 'numnodes' with 'node_online_map' - x86_64 Matthew Dobson
2004-12-23 22:47 ` [RFC PATCH 10/10] Replace 'numnodes' with 'node_online_map' - arch-independent Matthew Dobson
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=1103841695.3945.27.camel@arrakis \
--to=colpatch@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
/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
Powered by JetHome