x86: Sanity check the e820 against the SRAT table using e820 map only
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / x86 / mm / srat_64.c
index 0176595..c7a18aa 100644 (file)
@@ -345,7 +345,7 @@ static int __init nodes_cover_memory(const struct bootnode *nodes)
                        pxmram = 0;
        }
 
-       e820ram = max_pfn - absent_pages_in_range(0, max_pfn);
+       e820ram = max_pfn - (e820_hole_size(0, max_pfn<<PAGE_SHIFT)>>PAGE_SHIFT);
        /* We seem to lose 3 pages somewhere. Allow a bit of slack. */
        if ((long)(e820ram - pxmram) >= 1*1024*1024) {
                printk(KERN_ERR