These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git] / kernel / drivers / of / fdt.c
index cde35c5..d91f721 100644 (file)
@@ -955,7 +955,9 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
 }
 
 #ifdef CONFIG_HAVE_MEMBLOCK
-#define MAX_PHYS_ADDR  ((phys_addr_t)~0)
+#ifndef MAX_MEMBLOCK_ADDR
+#define MAX_MEMBLOCK_ADDR      ((phys_addr_t)~0)
+#endif
 
 void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
 {
@@ -972,16 +974,16 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
        }
        size &= PAGE_MASK;
 
-       if (base > MAX_PHYS_ADDR) {
+       if (base > MAX_MEMBLOCK_ADDR) {
                pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",
                                base, base + size);
                return;
        }
 
-       if (base + size - 1 > MAX_PHYS_ADDR) {
+       if (base + size - 1 > MAX_MEMBLOCK_ADDR) {
                pr_warning("Ignoring memory range 0x%llx - 0x%llx\n",
-                               ((u64)MAX_PHYS_ADDR) + 1, base + size);
-               size = MAX_PHYS_ADDR - base + 1;
+                               ((u64)MAX_MEMBLOCK_ADDR) + 1, base + size);
+               size = MAX_MEMBLOCK_ADDR - base + 1;
        }
 
        if (base + size < phys_offset) {