Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / mm / memblock.c
index e4f03a6..a9f18b9 100644 (file)
@@ -327,7 +327,7 @@ again:
                                            NUMA_NO_NODE, flags);
 
        if (!ret && (flags & MEMBLOCK_MIRROR)) {
-               pr_warn("Could not allocate %pap bytes of mirrored memory\n",
+               pr_warn_ratelimited("Could not allocate %pap bytes of mirrored memory\n",
                        &size);
                flags &= ~MEMBLOCK_MIRROR;
                goto again;
@@ -924,6 +924,9 @@ int __init_memblock memblock_clear_hotplug(phys_addr_t base, phys_addr_t size)
  */
 int __init_memblock memblock_mark_mirror(phys_addr_t base, phys_addr_t size)
 {
+       if (!mirrored_kernelcore)
+               return 0;
+
        system_has_some_mirror = true;
 
        return memblock_setclr_flag(base, size, 1, MEMBLOCK_MIRROR);
@@ -1384,7 +1387,7 @@ again:
 
        if (flags & MEMBLOCK_MIRROR) {
                flags &= ~MEMBLOCK_MIRROR;
-               pr_warn("Could not allocate %pap bytes of mirrored memory\n",
+               pr_warn_ratelimited("Could not allocate %pap bytes of mirrored memory\n",
                        &size);
                goto again;
        }