[PATCH] Have x86_64 use add_active_range() and free_area_init_nodes
[sfrench/cifs-2.6.git] / arch / x86_64 / mm / k8topology.c
index dd60e71fdba6fe827a2c61028cd88ad0cb5f9abe..b5b8dba28b4efa43000510ad924a83cc97a95fd4 100644 (file)
@@ -43,7 +43,7 @@ static __init int find_northbridge(void)
 int __init k8_scan_nodes(unsigned long start, unsigned long end)
 { 
        unsigned long prevbase;
-       struct node nodes[8];
+       struct bootnode nodes[8];
        int nodeid, i, nb; 
        unsigned char nodeids[8];
        int found = 0;
@@ -54,6 +54,9 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
 
        nodes_clear(nodes_parsed);
 
+       if (!early_pci_allowed())
+               return -1;
+
        nb = find_northbridge(); 
        if (nb < 0) 
                return nb;
@@ -146,6 +149,9 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
                
                nodes[nodeid].start = base; 
                nodes[nodeid].end = limit;
+               e820_register_active_regions(nodeid,
+                               nodes[nodeid].start >> PAGE_SHIFT,
+                               nodes[nodeid].end >> PAGE_SHIFT);
 
                prevbase = base;