[PATCH] LoongArch: Increase MAX_MEMORY_RANGES to 1024
Ming Wang
wangming01 at loongson.cn
Sun Mar 22 23:16:18 PDT 2026
Just a gentle ping.
在 2026/3/4 09:19, Ming Wang 写道:
> On some LoongArch systems, especially multi-socket machines like 3D6000,
> the current limit of MAX_MEMORY_RANGES (64) is too small to accommodate
> all memory range entries in /proc/iomem.
>
> When the limit is reached, get_memory_ranges() stops parsing, which causes
> kexec to fail with "locate_hole failed" because it cannot correctly identify
> the crash kernel reserved memory or necessary RAM segments.
>
> Increase MAX_MEMORY_RANGES to 1024 to support systems with complex
> memory layouts.
>
> Signed-off-by: Ming Wang <wangming01 at loongson.cn>
> ---
> kexec/arch/loongarch/kexec-loongarch.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kexec/arch/loongarch/kexec-loongarch.h b/kexec/arch/loongarch/kexec-loongarch.h
> index 2e65eb0..895809c 100644
> --- a/kexec/arch/loongarch/kexec-loongarch.h
> +++ b/kexec/arch/loongarch/kexec-loongarch.h
> @@ -8,7 +8,7 @@
> #define BOOT_BLOCK_VERSION 17
> #define BOOT_BLOCK_LAST_COMP_VERSION 16
>
> -#define MAX_MEMORY_RANGES 64
> +#define MAX_MEMORY_RANGES 1024
> #define MAX_LINE 160
>
> #define CORE_TYPE_ELF64 1
More information about the kexec
mailing list