]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
powerpc/fadump: Don't update the user-specified memory limit
authorAneesh Kumar K.V (IBM) <aneesh.kumar@kernel.org>
Wed, 3 Apr 2024 08:36:10 +0000 (14:06 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 19 Apr 2024 06:09:14 +0000 (16:09 +1000)
If the user specifies the memory limit, the kernel should honor it such
that all allocation and reservations are made within the memory limit
specified. fadump was breaking that rule. Remove the code which updates
the memory limit such that fadump reservations are done within the
limit specified.

Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240403083611.172833-2-aneesh.kumar@kernel.org
arch/powerpc/kernel/fadump.c

index d14eda1e85896807bdabb61987e4b21f3ee949ea..4e768d93c6d421cff85adbc09f0e4e03a4cccfa9 100644 (file)
@@ -573,22 +573,6 @@ int __init fadump_reserve_mem(void)
                }
        }
 
-       /*
-        * Calculate the memory boundary.
-        * If memory_limit is less than actual memory boundary then reserve
-        * the memory for fadump beyond the memory_limit and adjust the
-        * memory_limit accordingly, so that the running kernel can run with
-        * specified memory_limit.
-        */
-       if (memory_limit && memory_limit < memblock_end_of_DRAM()) {
-               size = get_fadump_area_size();
-               if ((memory_limit + size) < memblock_end_of_DRAM())
-                       memory_limit += size;
-               else
-                       memory_limit = memblock_end_of_DRAM();
-               printk(KERN_INFO "Adjusted memory_limit for firmware-assisted"
-                               " dump, now %#016llx\n", memory_limit);
-       }
        if (memory_limit)
                mem_boundary = memory_limit;
        else