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

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

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 04a87f81
...@@ -702,7 +702,7 @@ void __init mem_init(void) ...@@ -702,7 +702,7 @@ void __init mem_init(void)
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
#ifdef CONFIG_DISCONTIGMEM #ifdef CONFIG_DISCONTIGMEM
for (nid = 0; nid < numnodes; nid++) { for_each_online_node(nid) {
if (NODE_DATA(nid)->node_spanned_pages != 0) { if (NODE_DATA(nid)->node_spanned_pages != 0) {
printk("freeing bootmem node %x\n", nid); printk("freeing bootmem node %x\n", nid);
totalram_pages += totalram_pages +=
......
...@@ -216,7 +216,7 @@ static int numa_setup_cpu(unsigned long lcpu) ...@@ -216,7 +216,7 @@ static int numa_setup_cpu(unsigned long lcpu)
numa_domain = of_node_numa_domain(cpu); numa_domain = of_node_numa_domain(cpu);
if (numa_domain >= numnodes) { if (numa_domain >= num_online_nodes()) {
/* /*
* POWER4 LPAR uses 0xffff as invalid node, * POWER4 LPAR uses 0xffff as invalid node,
* dont warn in this case. * dont warn in this case.
...@@ -384,7 +384,8 @@ static int __init parse_numa_properties(void) ...@@ -384,7 +384,8 @@ static int __init parse_numa_properties(void)
goto new_range; goto new_range;
} }
numnodes = max_domain + 1; for (i = 0; i <= max_domain; i++)
node_set_online(i);
return 0; return 0;
} }
...@@ -430,12 +431,9 @@ static void __init dump_numa_topology(void) ...@@ -430,12 +431,9 @@ static void __init dump_numa_topology(void)
if (min_common_depth == -1 || !numa_enabled) if (min_common_depth == -1 || !numa_enabled)
return; return;
for (node = 0; node < MAX_NUMNODES; node++) { for_each_online_node(node) {
unsigned long i; unsigned long i;
if (!node_online(node))
continue;
printk(KERN_INFO "Node %d Memory:", node); printk(KERN_INFO "Node %d Memory:", node);
count = 0; count = 0;
...@@ -519,7 +517,7 @@ void __init do_init_bootmem(void) ...@@ -519,7 +517,7 @@ void __init do_init_bootmem(void)
register_cpu_notifier(&ppc64_numa_nb); register_cpu_notifier(&ppc64_numa_nb);
for (nid = 0; nid < numnodes; nid++) { for_each_online_node(nid) {
unsigned long start_paddr, end_paddr; unsigned long start_paddr, end_paddr;
int i; int i;
unsigned long bootmem_paddr; unsigned long bootmem_paddr;
...@@ -619,7 +617,7 @@ void __init paging_init(void) ...@@ -619,7 +617,7 @@ void __init paging_init(void)
memset(zones_size, 0, sizeof(zones_size)); memset(zones_size, 0, sizeof(zones_size));
memset(zholes_size, 0, sizeof(zholes_size)); memset(zholes_size, 0, sizeof(zholes_size));
for (nid = 0; nid < numnodes; nid++) { for_each_online_node(nid) {
unsigned long start_pfn; unsigned long start_pfn;
unsigned long end_pfn; unsigned long end_pfn;
......
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