X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Falpha%2Fmm%2Fnuma.c;h=e3e3806a6f254f02b3cec0d1a02fba5fc05639c2;hb=cff52daffa080eff6353f44df418b080dacefb96;hp=c7481d59b6dff4dc922acb6c6afce238f7a8b939;hpb=3e0777b8fa96f7073ed5d13d3bc1d573b766bef9;p=linux-2.6 diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c index c7481d59b6..e3e3806a6f 100644 --- a/arch/alpha/mm/numa.c +++ b/arch/alpha/mm/numa.c @@ -6,19 +6,21 @@ * Copyright (C) 2001 Andrea Arcangeli SuSE */ -#include #include #include #include #include #include #include +#include +#include #include #include pg_data_t node_data[MAX_NUMNODES]; bootmem_data_t node_bdata[MAX_NUMNODES]; +EXPORT_SYMBOL(node_data); #undef DEBUG_DISCONTIG #ifdef DEBUG_DISCONTIG @@ -27,9 +29,6 @@ bootmem_data_t node_bdata[MAX_NUMNODES]; #define DBGDCONT(args...) #endif -#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) -#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) -#define PFN_PHYS(x) ((x) << PAGE_SHIFT) #define for_each_mem_cluster(memdesc, cluster, i) \ for ((cluster) = (memdesc)->cluster, (i) = 0; \ (i) < (memdesc)->numclusters; (i)++, (cluster)++) @@ -371,6 +370,8 @@ show_mem(void) 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); @@ -384,6 +385,7 @@ show_mem(void) 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);