mm: move bootmem descriptors definition to a single place
[linux-2.6.git] / arch / alpha / mm / numa.c
index bf6b65c..a53fda0 100644 (file)
@@ -6,7 +6,6 @@
  *  Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/swap.h>
 #include <linux/initrd.h>
 #include <linux/pfn.h>
+#include <linux/module.h>
 
 #include <asm/hwrpb.h>
 #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
 #ifdef DEBUG_DISCONTIG
@@ -140,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);
@@ -241,7 +241,8 @@ setup_memory_node(int nid, void *kernel_end)
        }
 
        /* Reserve the bootmap memory.  */
-       reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size);
+       reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start),
+                       bootmap_size, BOOTMEM_DEFAULT);
        printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size));
 
        node_set_online(nid);
@@ -280,7 +281,7 @@ setup_memory(void *kernel_end)
                        nid = kvaddr_to_nid(initrd_start);
                        reserve_bootmem_node(NODE_DATA(nid),
                                             virt_to_phys((void *)initrd_start),
-                                            INITRD_SIZE);
+                                            INITRD_SIZE, BOOTMEM_DEFAULT);
                }
        }
 #endif /* CONFIG_BLK_DEV_INITRD */
@@ -302,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_boot_start >> PAGE_SHIFT;
+               unsigned long end_pfn = bdata->node_low_pfn;
 
                if (dma_local_pfn >= end_pfn - start_pfn)
                        zones_size[ZONE_DMA] = end_pfn - start_pfn;