From d88a4a140215bfa219aef764b8634572b91e4c1b Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Dec 06 2022 03:01:48 +0000 Subject: kexec-tools: ppc64: remove rma_top limit Resolves: bz2145087 Conflict: None commit 6b6187f546f0ddad8ea84d22c3f7ad72133dcfe3 Author: Sourabh Jain Date: Thu Sep 15 14:12:40 2022 +0530 ppc64: remove rma_top limit Restricting kexec tool to allocate hole for kexec segments below 768MB may not be relavent now since first memory block size can be 1024MB and more. Removing rma_top restriction will give more space to find holes for kexec segments and existing in-place checks make sure that kexec segment allocation doesn't cross the first memory block because every kexec segment has to be within first memory block for kdump kernel to boot properly. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Signed-off-by: Simon Horman Signed-off-by: Coiby Xu --- diff --git a/kexec-tools-2.0.25-ppc64-ppc64-remove-rma_top-limit.patch b/kexec-tools-2.0.25-ppc64-ppc64-remove-rma_top-limit.patch new file mode 100644 index 0000000..683447d --- /dev/null +++ b/kexec-tools-2.0.25-ppc64-ppc64-remove-rma_top-limit.patch @@ -0,0 +1,37 @@ +From 6b6187f546f0ddad8ea84d22c3f7ad72133dcfe3 Mon Sep 17 00:00:00 2001 +From: Sourabh Jain +Date: Thu, 15 Sep 2022 14:12:40 +0530 +Subject: [PATCH] ppc64: remove rma_top limit + +Restricting kexec tool to allocate hole for kexec segments below 768MB +may not be relavent now since first memory block size can be 1024MB and +more. + +Removing rma_top restriction will give more space to find holes for +kexec segments and existing in-place checks make sure that kexec segment +allocation doesn't cross the first memory block because every kexec segment +has to be within first memory block for kdump kernel to boot properly. + +Signed-off-by: Sourabh Jain +Acked-by: Hari Bathini +Signed-off-by: Simon Horman +--- + kexec/arch/ppc64/kexec-ppc64.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c +index 5b17740..611809f 100644 +--- a/kexec/arch/ppc64/kexec-ppc64.c ++++ b/kexec/arch/ppc64/kexec-ppc64.c +@@ -717,8 +717,6 @@ static int get_devtree_details(unsigned long kexec_flags) + if (base < rma_base) { + rma_base = base; + rma_top = base + be64_to_cpu(((uint64_t *)buf)[1]); +- if (rma_top > 0x30000000UL) +- rma_top = 0x30000000UL; + } + + fclose(file); +-- +2.38.1 + diff --git a/kexec-tools.spec b/kexec-tools.spec index e5f5e34..2b13919 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -99,6 +99,7 @@ Requires: systemd-udev%{?_isa} # # Patches 301 through 400 are meant for ppc64 kexec-tools enablement # +Patch301: kexec-tools-2.0.25-ppc64-ppc64-remove-rma_top-limit.patch # # Patches 401 through 500 are meant for s390 kexec-tools enablement @@ -126,6 +127,8 @@ mkdir -p -m755 kcp tar -z -x -v -f %{SOURCE9} tar -z -x -v -f %{SOURCE19} +%patch301 -p1 + %ifarch ppc %define archdef ARCH=ppc %endif