From 0a7342f722deb11155da144b73688d74aeaabf9d Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 1 Feb 2024 10:43:12 +0800 Subject: [PATCH] LoongArch64: adjust kernel position alignment rules Used to fix the problem that debug kernel kdump cannot be started. Signed-off-by: Ming Wang --- kexec-tools.spec | 5 ++++- loongarch64-fix-some-functional-issues-and-compilati.patch | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kexec-tools.spec b/kexec-tools.spec index 79d5e83..149960d 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -3,7 +3,7 @@ %global mkdf_ver 1.7.2 %global mkdf_shortver %(c=%{mkdf_ver}; echo ${c:0:7}) -%define anolis_release 4 +%define anolis_release 5 Name: kexec-tools Version: 2.0.26 @@ -344,6 +344,9 @@ done %doc TODO AUTHORS %changelog +* Thu Feb 1 2024 MingWang - 2.0.26-5 +- LoongArch64: adjust kernel position alignment rules + * Fri Nov 10 2023 Guoguo - 2.0.26-4 - fix build error for riscv64 diff --git a/loongarch64-fix-some-functional-issues-and-compilati.patch b/loongarch64-fix-some-functional-issues-and-compilati.patch index 29719f2..12bef50 100644 --- a/loongarch64-fix-some-functional-issues-and-compilati.patch +++ b/loongarch64-fix-some-functional-issues-and-compilati.patch @@ -136,7 +136,7 @@ index 4c7361c..51f334a 100644 - hole = _ALIGN_UP(hole, MiB(1)); + mem_min : crash_reserved_mem[usablemem_rgns.size - 1].start) + + loongarch_mem.text_offset; -+ hole = _ALIGN_UP(hole, MiB(16)); ++ hole = _ALIGN_UP(hole, MiB(32)); hole_end = hole + loongarch_mem.text_offset + loongarch_mem.image_size; if ((hole_end > mem_max) || @@ -145,7 +145,7 @@ index 4c7361c..51f334a 100644 hole = locate_hole(info, loongarch_mem.text_offset + loongarch_mem.image_size, - MiB(1), 0, ULONG_MAX, 1); -+ MiB(16), 0, ULONG_MAX, 1); ++ MiB(32), 0, ULONG_MAX, 1); if (hole == ULONG_MAX) dbgprintf("%s: locate_hole failed\n", __func__); -- Gitee