Messages in this thread Patch in this message | | | Subject | [RFC PATCH 8/10] Replace 'numnodes' with 'node_online_map' - ppc64 | From | Matthew Dobson <> | Date | Thu, 23 Dec 2004 14:45:15 -0800 |
| |
8/10 - Replace numnodes with node_online_map for ppc64
[mcd@arrakis node_online_map]$ diffstat arch-ppc64.patch init.c | 2 +- numa.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-)
-Matt
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/ppc64/mm/init.c linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/init.c --- linux-2.6.10-rc3-mm1/arch/ppc64/mm/init.c 2004-12-13 16:22:53.000000000 -0800 +++ linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/init.c 2004-12-14 11:57:17.000000000 -0800 @@ -703,7 +703,7 @@ void __init mem_init(void) high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); #ifdef CONFIG_DISCONTIGMEM - for (nid = 0; nid < numnodes; nid++) { + for_each_online_node(nid) { if (NODE_DATA(nid)->node_spanned_pages != 0) { printk("freeing bootmem node %x\n", nid); totalram_pages += diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/ppc64/mm/numa.c linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/numa.c --- linux-2.6.10-rc3-mm1/arch/ppc64/mm/numa.c 2004-12-13 16:22:53.000000000 -0800 +++ linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/numa.c 2004-12-15 13:29:14.000000000 -0800 @@ -216,7 +216,7 @@ static int numa_setup_cpu(unsigned long numa_domain = of_node_numa_domain(cpu); - if (numa_domain >= numnodes) { + if (numa_domain >= num_online_nodes()) { /* * POWER4 LPAR uses 0xffff as invalid node, * dont warn in this case. @@ -384,7 +384,8 @@ new_range: goto new_range; } - numnodes = max_domain + 1; + for (i = 0; i <= max_domain; i++) + node_set_online(i); return 0; } @@ -430,12 +431,9 @@ static void __init dump_numa_topology(vo if (min_common_depth == -1 || !numa_enabled) return; - for (node = 0; node < MAX_NUMNODES; node++) { + for_each_online_node(node) { unsigned long i; - if (!node_online(node)) - continue; - printk(KERN_INFO "Node %d Memory:", node); count = 0; @@ -519,7 +517,7 @@ void __init do_init_bootmem(void) register_cpu_notifier(&ppc64_numa_nb); - for (nid = 0; nid < numnodes; nid++) { + for_each_online_node(nid) { unsigned long start_paddr, end_paddr; int i; unsigned long bootmem_paddr; @@ -619,7 +617,7 @@ void __init paging_init(void) memset(zones_size, 0, sizeof(zones_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 end_pfn;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |