]> err.no Git - linux-2.6/blobdiff - arch/x86/mm/srat_64.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[linux-2.6] / arch / x86 / mm / srat_64.c
index b67f5a16755ff6a96f71757821422d68acced729..1b4763e26ea96f52b6240475e85a04cb3a06dc4b 100644 (file)
@@ -100,7 +100,19 @@ static __init inline int srat_disabled(void)
 /* Callback for SLIT parsing */
 void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
 {
-       acpi_slit = slit;
+       unsigned length;
+       unsigned long phys;
+
+       length = slit->header.length;
+       phys = find_e820_area(0, max_pfn_mapped<<PAGE_SHIFT, length,
+                PAGE_SIZE);
+
+       if (phys == -1L)
+               panic(" Can not save slit!\n");
+
+       acpi_slit = __va(phys);
+       memcpy(acpi_slit, slit, length);
+       reserve_early(phys, phys + length, "ACPI SLIT");
 }
 
 /* Callback for Proximity Domain -> LAPIC mapping */
@@ -299,7 +311,7 @@ static int __init nodes_cover_memory(const struct bootnode *nodes)
                        pxmram = 0;
        }
 
-       e820ram = end_pfn - absent_pages_in_range(0, end_pfn);
+       e820ram = max_pfn - absent_pages_in_range(0, max_pfn);
        /* We seem to lose 3 pages somewhere. Allow a bit of slack. */
        if ((long)(e820ram - pxmram) >= 1*1024*1024) {
                printk(KERN_ERR