]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - arch/mips/mti-malta/malta-memory.c
Merge tag 'v4.0.8' into xlnx_4.0.8-rt6
[zynq/linux.git] / arch / mips / mti-malta / malta-memory.c
index 8fddd2cdbff72920cb7a9c73154a7b95413fb306..efe366d618b1f93fe4cae9446cdb43487834a4e6 100644 (file)
@@ -53,6 +53,12 @@ fw_memblock_t * __init fw_getmdesc(int eva)
                pr_warn("memsize not set in YAMON, set to default (32Mb)\n");
                physical_memsize = 0x02000000;
        } else {
+               if (memsize > (256 << 20)) { /* memsize should be capped to 256M */
+                       pr_warn("Unsupported memsize value (0x%lx) detected! "
+                               "Using 0x10000000 (256M) instead\n",
+                               memsize);
+                       memsize = 256 << 20;
+               }
                /* If ememsize is set, then set physical_memsize to that */
                physical_memsize = ememsize ? : memsize;
        }