summaryrefslogtreecommitdiffstats
path: root/arch/alpha/mm/numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/mm/numa.c')
-rw-r--r--arch/alpha/mm/numa.c45
1 files changed, 5 insertions, 40 deletions
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 10ab783..a13de49 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -19,7 +19,6 @@
#include <asm/pgalloc.h>
pg_data_t node_data[MAX_NUMNODES];
-bootmem_data_t node_bdata[MAX_NUMNODES];
EXPORT_SYMBOL(node_data);
#undef DEBUG_DISCONTIG
@@ -141,7 +140,7 @@ setup_memory_node(int nid, void *kernel_end)
printk(" not enough mem to reserve NODE_DATA");
return;
}
- NODE_DATA(nid)->bdata = &node_bdata[nid];
+ NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
printk(" Detected node memory: start %8lu, end %8lu\n",
node_min_pfn, node_max_pfn);
@@ -304,8 +303,9 @@ void __init paging_init(void)
dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
for_each_online_node(nid) {
- unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT;
- unsigned long end_pfn = node_bdata[nid].node_low_pfn;
+ bootmem_data_t *bdata = &bootmem_node_data[nid];
+ unsigned long start_pfn = bdata->node_min_pfn;
+ unsigned long end_pfn = bdata->node_low_pfn;
if (dma_local_pfn >= end_pfn - start_pfn)
zones_size[ZONE_DMA] = end_pfn - start_pfn;
@@ -313,7 +313,7 @@ void __init paging_init(void)
zones_size[ZONE_DMA] = dma_local_pfn;
zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn;
}
- free_area_init_node(nid, NODE_DATA(nid), zones_size, start_pfn, NULL);
+ free_area_init_node(nid, zones_size, start_pfn, NULL);
}
/* Initialize the kernel's ZERO_PGE. */
@@ -359,38 +359,3 @@ void __init mem_init(void)
mem_stress();
#endif
}
-
-void
-show_mem(void)
-{
- long i,free = 0,total = 0,reserved = 0;
- long shared = 0, cached = 0;
- int nid;
-
- printk("\nMem-info:\n");
- show_free_areas();
- printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
- for_each_online_node(nid) {
- unsigned long flags;
- pgdat_resize_lock(NODE_DATA(nid), &flags);
- i = node_spanned_pages(nid);
- while (i-- > 0) {
- struct page *page = nid_page_nr(nid, i);
- total++;
- if (PageReserved(page))
- reserved++;
- else if (PageSwapCache(page))
- cached++;
- else if (!page_count(page))
- free++;
- else
- shared += page_count(page) - 1;
- }
- pgdat_resize_unlock(NODE_DATA(nid), &flags);
- }
- printk("%ld pages of RAM\n",total);
- printk("%ld free pages\n",free);
- printk("%ld reserved pages\n",reserved);
- printk("%ld pages shared\n",shared);
- printk("%ld pages swap cached\n",cached);
-}
OpenPOWER on IntegriCloud