Commit b1d3e227 authored by Matthew Dobson's avatar Matthew Dobson Committed by Linus Torvalds

[PATCH] Replace 'numnodes' with 'node_online_map' - m32r

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9269293d
...@@ -251,7 +251,9 @@ void __init setup_arch(char **cmdline_p) ...@@ -251,7 +251,9 @@ void __init setup_arch(char **cmdline_p)
#endif #endif
#ifdef CONFIG_DISCONTIGMEM #ifdef CONFIG_DISCONTIGMEM
numnodes = 2; nodes_clear(node_online_map);
node_set_online(0);
node_set_online(1);
#endif /* CONFIG_DISCONTIGMEM */ #endif /* CONFIG_DISCONTIGMEM */
init_mm.start_code = (unsigned long) _text; init_mm.start_code = (unsigned long) _text;
......
...@@ -75,7 +75,7 @@ unsigned long __init setup_memory(void) ...@@ -75,7 +75,7 @@ unsigned long __init setup_memory(void)
mem_prof_init(); mem_prof_init();
for (nid = 0 ; nid < numnodes ; nid++) { for_each_online_node(nid) {
mp = &mem_prof[nid]; mp = &mem_prof[nid];
NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid];
NODE_DATA(nid)->bdata = &node_bdata[nid]; NODE_DATA(nid)->bdata = &node_bdata[nid];
...@@ -135,12 +135,12 @@ unsigned long __init zone_sizes_init(void) ...@@ -135,12 +135,12 @@ unsigned long __init zone_sizes_init(void)
mem_prof_t *mp; mem_prof_t *mp;
pgdat_list = NULL; 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; NODE_DATA(nid)->pgdat_next = pgdat_list;
pgdat_list = NODE_DATA(nid); pgdat_list = NODE_DATA(nid);
} }
for (nid = 0 ; nid < numnodes ; nid++) { for_each_online_node(nid) {
mp = &mem_prof[nid]; mp = &mem_prof[nid];
for (i = 0 ; i < MAX_NR_ZONES ; i++) { for (i = 0 ; i < MAX_NR_ZONES ; i++) {
zones_size[i] = 0; zones_size[i] = 0;
......
...@@ -153,7 +153,7 @@ int __init reservedpages_count(void) ...@@ -153,7 +153,7 @@ int __init reservedpages_count(void)
int reservedpages, nid, i; int reservedpages, nid, i;
reservedpages = 0; 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++) for (i = 0 ; i < MAX_LOW_PFN(nid) - START_PFN(nid) ; i++)
if (PageReserved(NODE_DATA(nid)->node_mem_map + i)) if (PageReserved(NODE_DATA(nid)->node_mem_map + i))
reservedpages++; reservedpages++;
...@@ -174,7 +174,7 @@ void __init mem_init(void) ...@@ -174,7 +174,7 @@ void __init mem_init(void)
#endif #endif
num_physpages = 0; 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 += MAX_LOW_PFN(nid) - START_PFN(nid) + 1;
num_physpages -= hole_pages; num_physpages -= hole_pages;
...@@ -193,7 +193,7 @@ void __init mem_init(void) ...@@ -193,7 +193,7 @@ void __init mem_init(void)
memset(empty_zero_page, 0, PAGE_SIZE); memset(empty_zero_page, 0, PAGE_SIZE);
/* this will put all low memory onto the freelists */ /* 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)); totalram_pages += free_all_bootmem_node(NODE_DATA(nid));
reservedpages = reservedpages_count() - hole_pages; reservedpages = reservedpages_count() - hole_pages;
......
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