linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* powerpc/fadump: skip parameter area allocation when fadump is disabled
@ 2025-10-07  7:40 Sourabh Jain
  2025-10-07 10:28 ` Hari Bathini
  0 siblings, 1 reply; 5+ messages in thread
From: Sourabh Jain @ 2025-10-07  7:40 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Sourabh Jain, Hari Bathini, Madhavan Srinivasan, Michael Ellerman

Fadump allocates memory to pass additional kernel command-line argument
to the fadump kernel. However, this allocation is not needed when fadump
is disabled. So avoid allocating memory for the additional parameter
area in such cases.

Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
 arch/powerpc/kernel/fadump.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 5782e743fd27..4ebc333dd786 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1747,6 +1747,9 @@ void __init fadump_setup_param_area(void)
 {
 	phys_addr_t range_start, range_end;
 
+	if (!fw_dump.fadump_enabled)
+		return;
+
 	if (!fw_dump.param_area_supported || fw_dump.dump_active)
 		return;
 
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread
* powerpc/fadump: skip parameter area allocation when fadump is disabled
@ 2025-10-08  3:29 Sourabh Jain
  2025-10-18  5:33 ` Madhavan Srinivasan
  0 siblings, 1 reply; 5+ messages in thread
From: Sourabh Jain @ 2025-10-08  3:29 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Sourabh Jain, Madhavan Srinivasan, Michael Ellerman, Hari Bathini

Fadump allocates memory to pass additional kernel command-line argument
to the fadump kernel. However, this allocation is not needed when fadump
is disabled. So avoid allocating memory for the additional parameter
area in such cases.

Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Fixes: f4892c68ecc1 ("powerpc/fadump: allocate memory for additional parameters early")
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---

Changelog:

v1 -> v2
 - Added fixes and reviewed-by tag

---
 arch/powerpc/kernel/fadump.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 5782e743fd27..4ebc333dd786 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1747,6 +1747,9 @@ void __init fadump_setup_param_area(void)
 {
 	phys_addr_t range_start, range_end;
 
+	if (!fw_dump.fadump_enabled)
+		return;
+
 	if (!fw_dump.param_area_supported || fw_dump.dump_active)
 		return;
 
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-18  5:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07  7:40 powerpc/fadump: skip parameter area allocation when fadump is disabled Sourabh Jain
2025-10-07 10:28 ` Hari Bathini
2025-10-08  3:43   ` Sourabh Jain
  -- strict thread matches above, loose matches on Subject: below --
2025-10-08  3:29 Sourabh Jain
2025-10-18  5:33 ` Madhavan Srinivasan

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).