linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V (IBM)" <aneesh.kumar@kernel.org>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	npiggin@gmail.com, christophe.leroy@csgroup.eu
Cc: "Aneesh Kumar K.V \(IBM\)" <aneesh.kumar@kernel.org>,
	Naveen N Rao <naveen@kernel.org>,
	Mahesh Salgaonkar <mahesh@linux.ibm.com>
Subject: [PATCH 2/3] powerpc/fadump: Don't update the user-specified memory limit
Date: Wed,  3 Apr 2024 14:06:10 +0530	[thread overview]
Message-ID: <20240403083611.172833-2-aneesh.kumar@kernel.org> (raw)
In-Reply-To: <20240403083611.172833-1-aneesh.kumar@kernel.org>

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.

Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com> 
Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@kernel.org>
---
 arch/powerpc/kernel/fadump.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index d14eda1e8589..4e768d93c6d4 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -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
-- 
2.44.0


  reply	other threads:[~2024-04-03  8:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  8:36 [PATCH 1/3] powerpc/mm: Align memory_limit value specified using mem= kernel parameter Aneesh Kumar K.V (IBM)
2024-04-03  8:36 ` Aneesh Kumar K.V (IBM) [this message]
2024-04-03  8:36 ` [PATCH 3/3] powerpc/mm: Update the memory limit based on direct mapping restrictions Aneesh Kumar K.V (IBM)
2024-04-17 14:36 ` [PATCH 1/3] powerpc/mm: Align memory_limit value specified using mem= kernel parameter Joel Savitz
2024-05-02 19:20   ` Joel Savitz
2024-05-03  2:20     ` Michael Ellerman
2024-05-03 19:59       ` Joel Savitz
2024-05-03 10:41 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240403083611.172833-2-aneesh.kumar@kernel.org \
    --to=aneesh.kumar@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).