]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/fadump: skip parameter area allocation when fadump is disabled
authorSourabh Jain <sourabhjain@linux.ibm.com>
Wed, 8 Oct 2025 03:29:34 +0000 (08:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Oct 2025 14:24:32 +0000 (16:24 +0200)
[ 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>
arch/powerpc/kernel/fadump.c

index 5782e743fd27020f2a8fc02bfd3d114acf74edca..4ebc333dd786f605ffaa26d9eeb80a7c86edfa90 100644 (file)
@@ -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;