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)
#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;
......
......@@ -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(void)
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;
......
......@@ -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;
......
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