Commit 0c33aaa4 authored by Matthew Dobson's avatar Matthew Dobson Committed by Linus Torvalds

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

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7f257c1b
...@@ -246,7 +246,7 @@ setup_memory_node(int nid, void *kernel_end) ...@@ -246,7 +246,7 @@ setup_memory_node(int nid, void *kernel_end)
reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size); reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size);
printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size)); printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size));
numnodes++; node_set_online(nid);
} }
void __init void __init
...@@ -256,7 +256,7 @@ setup_memory(void *kernel_end) ...@@ -256,7 +256,7 @@ setup_memory(void *kernel_end)
show_mem_layout(); show_mem_layout();
numnodes = 0; nodes_clear(node_online_map);
min_low_pfn = ~0UL; min_low_pfn = ~0UL;
max_low_pfn = 0UL; max_low_pfn = 0UL;
...@@ -303,7 +303,7 @@ void __init paging_init(void) ...@@ -303,7 +303,7 @@ void __init paging_init(void)
*/ */
dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
for (nid = 0; nid < numnodes; nid++) { for_each_online_node(nid) {
unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT; unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT;
unsigned long end_pfn = node_bdata[nid].node_low_pfn; unsigned long end_pfn = node_bdata[nid].node_low_pfn;
...@@ -332,7 +332,7 @@ void __init mem_init(void) ...@@ -332,7 +332,7 @@ void __init mem_init(void)
high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
reservedpages = 0; reservedpages = 0;
for (nid = 0; nid < numnodes; nid++) { for_each_online_node(nid) {
/* /*
* This will free up the bootmem, ie, slot 0 memory * This will free up the bootmem, ie, slot 0 memory
*/ */
...@@ -372,7 +372,7 @@ show_mem(void) ...@@ -372,7 +372,7 @@ show_mem(void)
printk("\nMem-info:\n"); printk("\nMem-info:\n");
show_free_areas(); show_free_areas();
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
for (nid = 0; nid < numnodes; nid++) { for_each_online_node(nid) {
struct page * lmem_map = node_mem_map(nid); struct page * lmem_map = node_mem_map(nid);
i = node_spanned_pages(nid); i = node_spanned_pages(nid);
while (i-- > 0) { while (i-- > 0) {
......
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