summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSourabh Jain <sourabhjain@linux.ibm.com>2025-10-08 08:59:34 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-23 16:24:32 +0200
commitd4ab141558a040df774c9cd4b148facf90738590 (patch)
treec93b2de591845b4fb9738b864368735b7670087f /arch
parent295f35cd6cc69225855f1d1f3b927a0c351b0c91 (diff)
downloadlinux-d4ab141558a040df774c9cd4b148facf90738590.tar.gz
linux-d4ab141558a040df774c9cd4b148facf90738590.tar.bz2
linux-d4ab141558a040df774c9cd4b148facf90738590.zip
powerpc/fadump: skip parameter area allocation when fadump is disabled
[ Upstream commit 0843ba458439f38efdc14aa359c14ad0127edb01 ] 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. 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> Fixes: f4892c68ecc1 ("powerpc/fadump: allocate memory for additional parameters early") Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20251008032934.262683-1-sourabhjain@linux.ibm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/fadump.c3
1 files changed, 3 insertions, 0 deletions
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;